Win64 Sstand alone SQLite

This is the forum for miscellaneous technical/programming questions.

Moderator: 2ffat

Post Reply
Andrew McIsaac
Active Poster
Active Poster
Posts: 17
Joined: Fri Nov 06, 2020 12:36 am

Win64 Sstand alone SQLite

Post by Andrew McIsaac »

Good morning everyone,
Using C++ Builder 10.4, MultiDevice, targeting Win64
Trying to connect to a sqlite table - Win32 works, Win64 fails

Again executable - so I need
Prject Options :
C++ Linker Link with Dynamic RTL = false
Runtime Packages - Link with runtime packages = false


was trying with FireDac, several emails with Embarcadero - but can not get past the

Ending up with the same error -
[ilink64 Warning] Warning: Out of memory
[ilink64 Error] "ilink32" exited with code 2.

After more than a week of emails with Embarcadero - and no success I dropped the FIREDAC stuff - and try to do this another way.

Win 32 id fin but 64 fails
Trying to use a SQLConnection, and a SQLQuerry, on a Stand Alone Exectuable for Windows 64 bit

On form I have SQLConnection1, and SQLQuery1 Couple of buttons and Edit1

I can connect to table :

Code: Select all

void __fastcall TTabbedForm::Button1Click(TObject *Sender)
{

		SQLConnection1->ConnectionName = "DUC SQLite";
		SQLConnection1->DriverName = "SQLite";
		SQLConnection1->VendorLib = "sqlite3.dll";
		SQLConnection1->LoginPrompt = false;
		SQLConnection1->Params->Values["Database"] = "E:\\IDM_C\\Programs\\DUC 2020 December\\Program\\Win64\\Debug\\DUC_db.s3db";
		SQLConnection1->Connected=true;
}
Trying to do something with the Query fails :

Code: Select all

void __fastcall TTabbedForm::Button2Click(TObject *Sender)
{

		TabbedForm->SQLQuery1->SQL->Clear();
		TabbedForm->SQLQuery1->SQL->Add("SELECT * FROM DUC_Settings");
		TabbedForm->SQLQuery1->Active=true;
		TabbedForm->SQLQuery1->Open();
		TabbedForm->SQLQuery1->First();
		String temp;

		temp = TabbedForm->SQLQuery1->FieldByName("Time_Duration_L")->AsString;
		Edit1->Text=temp;

}
This fails
See attached image


Any ideas ?
Error.png
Error.png (5.98 KiB) Viewed 1108 times
Thanks,
Andrew
User avatar
2ffat
Forum Mod
Forum Mod
Posts: 452
Joined: Wed Jun 23, 2004 7:07 am
Location: South Hill, VA
Contact:

Re: Win64 Sstand alone SQLite

Post by 2ffat »

just off the top of my head and without digging deeper, try

Code: Select all

TabbedForm->SQLQuery1->SQL->Close();
instead of

Code: Select all

TabbedForm->SQLQuery1->SQL->Clear();
James P. Cottingham

Look at me still talking
when there is science to do.
Andrew McIsaac
Active Poster
Active Poster
Posts: 17
Joined: Fri Nov 06, 2020 12:36 am

Re: Win64 Sstand alone SQLite

Post by Andrew McIsaac »

Thanks for responding, but
Not Available SQL->Close is not available command.
HsiaLin
BCBJ Master
BCBJ Master
Posts: 343
Joined: Sun Jul 08, 2007 6:29 pm

Re: Win64 Sstand alone SQLite

Post by HsiaLin »

Have you tried it without setting these setting to false to see if it makes a difference?

C++ Linker Link with Dynamic RTL = false
Runtime Packages - Link with runtime packages = false
Andrew McIsaac
Active Poster
Active Poster
Posts: 17
Joined: Fri Nov 06, 2020 12:36 am

Re: Win64 Sstand alone SQLite

Post by Andrew McIsaac »

Thank you for responding.

Program works in Win32 and Win64
I can compile as stand alone with the two setting to false - all good, for Win32

Win 64 is the one that fails with these two set to create a stand alone exe, which is what I am trying to achieve.

Thanks,
Andrew
HsiaLin
BCBJ Master
BCBJ Master
Posts: 343
Joined: Sun Jul 08, 2007 6:29 pm

Re: Win64 Sstand alone SQLite

Post by HsiaLin »

Interesting video concerning sqlite.

https://www.youtube.com/watch?v=5glYeAp ... chnologies
Post Reply