Page 1 of 1
Uniloader error "Invalid variant type"
Posted: Mon 26 Sep 2016 12:10
by ertank
Hi,
Using Delphi 10.1, UniDAC 6.4.14
I prepared a small test application. Can be downloaded from here:
https://mega.nz/#!7xkn2LJD!2Gr177NabgHD ... TRrcLyB-Og
I am trying to import from a SQLite3 database into MSSQL database using TUniLoader.
In my SQLite query I am providing some fix values of type string. These string is manipulated as MEMO by UniQuery. And, UniLoader is raising subject error.
Moreover, having this error also causes some memory leak as follows:
Any help is appreciated.
Re: Uniloader error "Invalid variant type"
Posted: Thu 29 Sep 2016 13:17
by azyk
Thank you for the provided sample. We have reproduced the issue using it and are now investigating it. We will inform you as soon as any results are available.
Re: Uniloader error "Invalid variant type"
Posted: Tue 18 Oct 2016 21:12
by ertank
Hi,
Is it known if there will be a fix included for this error for next release which planned to be in this month?
Thanks.
Re: Uniloader error "Invalid variant type"
Posted: Thu 17 Nov 2016 14:10
by azyk
We have answered you at the following topic:
viewtopic.php?f=28&t=34514
Re: Uniloader error "Invalid variant type"
Posted: Mon 28 Nov 2016 11:24
by ertank
Hi,
I double checked. Unfortunately, subject error and leak still present in latest version 6.4.16
I have used same small test project at link provided in first post. SQL Servers test repeated are;
- SQL Server 2016 Express 64bit.
- SQL Server 2012 Express 64bit.
Error is same "Invalid variant type."
Re: Uniloader error "Invalid variant type"
Posted: Tue 06 Dec 2016 21:10
by ertank
Hello,
I do appreciate a feedback about my last message before this one, please.
Thanks.
Re: Uniloader error "Invalid variant type"
Posted: Wed 07 Dec 2016 14:19
by azyk
In the sent sample SQLite returns the Memo type to dataset-source for the AktarimTarihSaati field. But in TUniLoader the AktarimTarihSaati field has the DateTime type. When calling the TUniLoader.LoadFromDataSet method there is an error during the Memo type value conversion into the DateTime type and UniDAC returns the error 'Invalid variant type' which you get in the application.
To solve the issue set the DateTime type to the AktarimTarihSaati field in dataset-source, for example using Data Type Maping:
Code: Select all
qrySource.SQL.Add('from TERMINAL_SAYIM');
qrySource.DataTypeMap.AddFieldNameRule('AktarimTarihSaati', ftDateTime); // add code here
qrySource.Open();
Also we fixed memory leak occurrence. This fix will be included in the next UniDAC build. If you want to get this fix before the release, please tell us and we will send you a night build.
Re: Uniloader error "Invalid variant type"
Posted: Thu 08 Dec 2016 21:40
by ertank
I confirm that using DataTypeMap.AddFieldNameRule() as indicated in above post solves TUniLoader error.
Regarding memory leak occurrence, I believe this is happening if there is an exception when running TUniLoader.LoadFromDataSet(). If this is the case, I can wait for next planned release.
If leak might occur during regular execution without error (I must tell I did not observe that) I would like to have a nightly build, please.
Thanks.
Re: Uniloader error "Invalid variant type"
Posted: Fri 09 Dec 2016 12:21
by azyk
In your sample the memory leak cause was the 'Invalid variant type' error occurrence when calling the TUniLoader.LoadFromDataSet method. We fixed the memory leak when this error occurs. We sent a night build with this fix to your email.