TUniLoader invalid column number
TUniLoader invalid column number
Within UniLoaderPutData I am calling PutColumnData using the column name.
I have verified that the column is in the uniloader columns property
but I get an error, "invalid column number"
Any ideas?
Further info, loader is created programatically
Tab = new TUniTable(uni);
Tab->Connection = uni;
loader = new TUniLoader(Tab);
loader->Connection = uni;
loader->OnPutData = UniLoaderPutData;
LoaderRecNo = 0;
Data is in a couple of call variable
LoaderField = f;
LoaderValue = s;
loader->OnPutData(loader);
Sender->PutColumnData(LoaderField, LoaderRecNo, LoaderValue); // **** error occurs here
LoaderRecNo is incremented for each row and reset when data written to table
LoaderRecNo++;
if(LoaderRecNo > 10)
{
loader->Load();
LoaderRecNo = 0;
}
I have verified that the column is in the uniloader columns property
but I get an error, "invalid column number"
Any ideas?
Further info, loader is created programatically
Tab = new TUniTable(uni);
Tab->Connection = uni;
loader = new TUniLoader(Tab);
loader->Connection = uni;
loader->OnPutData = UniLoaderPutData;
LoaderRecNo = 0;
Data is in a couple of call variable
LoaderField = f;
LoaderValue = s;
loader->OnPutData(loader);
Sender->PutColumnData(LoaderField, LoaderRecNo, LoaderValue); // **** error occurs here
LoaderRecNo is incremented for each row and reset when data written to table
LoaderRecNo++;
if(LoaderRecNo > 10)
{
loader->Load();
LoaderRecNo = 0;
}
Re: TUniLoader invalid column number
Hello,
We cannot reproduce the problem. Please clarify the versions of the IDE and UniDAC. In addition, specify the name of the DB you are working with, and send the table creating script and the full sample reproducing the problem to alexp*devart*com
We cannot reproduce the problem. Please clarify the versions of the IDE and UniDAC. In addition, specify the name of the DB you are working with, and send the table creating script and the full sample reproducing the problem to alexp*devart*com
Re: TUniLoader invalid column number
Alex
I am using Builder XE5 unidac51d17 with sqlite.
Do you have an example creating and using TUniLoader programatically?
I am using Builder XE5 unidac51d17 with sqlite.
Do you have an example creating and using TUniLoader programatically?
Re: TUniLoader invalid column number
Thanks alex - demo program sent
Re: TUniLoader invalid column number
Hello,
To use UniLoader, you should use the following code:
To use UniLoader, you should use the following code:
Code: Select all
class TMyClass : public TObject
{
private: // User declarations
TUniConnection *UniConnection;
TUniLoader *UniLoader;
int LoaderRecNo;
void __fastcall PutData(TDALoader *Sender);
public: // User declarations
__fastcall TMyClass();
};
void __fastcall TMyClass::PutData(TDALoader *Sender)
{
for (int i = 0; i < LoaderRecNo ; i++) {
Sender->PutColumnData("f1", i, "data");
Sender->PutColumnData("f2", i, "data");
}
}
__fastcall TMyClass::TMyClass(): TObject()
{
UniConnection = new TUniConnection(NULL);
UniConnection->ConnectString = "ProviderName=SQLite;Database=:memory:";
UniConnection->ExecSQL("create table table1 (f1 text, f2 text)");
UniLoader = new TUniLoader(NULL);
UniLoader->Connection = UniConnection;
UniLoader->TableName = "table1";
UniLoader->OnPutData = PutData;
UniLoader->Load();
}Re: TUniLoader invalid column number
I have been told by devart that this is a bug and will be fixed in the next release. I have asked (twice) if there is a work around and when the next release is but have had no answer.
I guess this is as good a reason as any to try firedac.
I guess this is as good a reason as any to try firedac.
Re: TUniLoader invalid column number
Hello,
Unfortunately, we haven't received any letters from you..
For the time being, there is no workaround for the problem. The new version including this fix will be released within a week.
Unfortunately, we haven't received any letters from you..
For the time being, there is no workaround for the problem. The new version including this fix will be released within a week.
Re: TUniLoader invalid column number
Alex I sent two emails to alexp [@] devart.com (I replied to your email informing me of the bug) one on 16/12 at 11:49 (UK time) and again on 17/12 at 10:09
Re: TUniLoader invalid column number
Hello,
Unfortunately, we haven't received your mail, it might be blocked by our spam-filter.
Unfortunately, we haven't received your mail, it might be blocked by our spam-filter.
Re: TUniLoader invalid column number
Hi - will this be released this side of Christmas? if not when?AlexP wrote: For the time being, there is no workaround for the problem. The new version including this fix will be released within a week.
Cheers
Re: TUniLoader invalid column number
I'll take that as a no then
Re: TUniLoader invalid column number
Hello,
The new UniDAC version is already available at our website for download now
The new UniDAC version is already available at our website for download now
Re: TUniLoader invalid column number
Thanks - downloading
Merry Christmas
Merry Christmas
Re: TUniLoader invalid column number
When I compile under Builder XE5 update 2 with the new version (5.2.5) I get the following error messages
[ilink32 Error] Error: Unresolved external 'memcmp' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\LITEPROVIDER190.LIB|LiteStaticUni
[ilink32 Error] Error: Unresolved external 'memmove' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\LITEPROVIDER190.LIB|LiteStaticUni
Any ideas?
[ilink32 Error] Error: Unresolved external 'memcmp' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\LITEPROVIDER190.LIB|LiteStaticUni
[ilink32 Error] Error: Unresolved external 'memmove' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\LITEPROVIDER190.LIB|LiteStaticUni
Any ideas?
Re: TUniLoader invalid column number
Hello,
Thank you for the information, we have reproduced the problem and will try to fix it in the nearest future.
Thank you for the information, we have reproduced the problem and will try to fix it in the nearest future.