Página 1 de 1

Is this the correct Sqlite syntax?

Publicado: Mié Ago 07, 2013 3:12 pm
por DC
Hi,
Which versions of Sqlite are supported, by Xailer's internal interface? None of the following syntax is retrieving any records. The connection appears to be valid, but none of the data arrays get populated. If I run the same queries in some of the third-party sqlite maintenance utilities, the queries work fine.
LOCAL oSqlIte
LOCAL oSqlResult
LOCAL aSqlRow := {}
LOCAL aSqlRows := {}
LOCAL aNames := {}
LOCAL xResult // Generic return variable, for development purposes
oSqlIte := TSQLiteDataSource():New()
xResult := oSqlIte:Connect( "World.db3" )
oSqlResult := oSqlIte:Query( "SELECT * FROM Country" )
xResult := oSqlResult:Open()
xResult := oSqlResult:RecCount()
aSqlRow := oSqlResult:GetRow()
or
aSqlRows := oSqlIte:QueryArray( "SELECT * FROM Country", @aNames )
xResult := oSqlIte:Connect( "Chinook_Sqlite.sqlite" )
oSqlResult := oSqlIte:Query( "SELECT * FROM Customer" )
xResult := oSqlResult:Open()
xResult := oSqlResult:RecCount()
aSqlRow := oSqlResult:GetRow()
or
aSqlRows := oSqlIte:QueryArray( "SELECT * FROM Customer", @aNames )

Is this the correct Sqlite syntax?

Publicado: Jue Ago 08, 2013 8:02 pm
por ignacio
DC escribió el mié, 07 agosto 2013 15:12Hi,
Which versions of Sqlite are supported, by Xailer's internal interface? None of the following syntax is retrieving any records. The connection appears to be valid, but none of the data arrays get populated. If I run the same queries in some of the third-party sqlite maintenance utilities, the queries work fine.
LOCAL oSqlIte
LOCAL oSqlResult
LOCAL aSqlRow := {}
LOCAL aSqlRows := {}
LOCAL aNames := {}
LOCAL xResult // Generic return variable, for development purposes
oSqlIte := TSQLiteDataSource():New()
xResult := oSqlIte:Connect( "World.db3" )
oSqlResult := oSqlIte:Query( "SELECT * FROM Country" )
xResult := oSqlResult:Open()
xResult := oSqlResult:RecCount()
aSqlRow := oSqlResult:GetRow()
or
aSqlRows := oSqlIte:QueryArray( "SELECT * FROM Country", @aNames )
xResult := oSqlIte:Connect( "Chinook_Sqlite.sqlite" )
oSqlResult := oSqlIte:Query( "SELECT * FROM Customer" )
xResult := oSqlResult:Open()
xResult := oSqlResult:RecCount()
aSqlRow := oSqlResult:GetRow()
or
aSqlRows := oSqlIte:QueryArray( "SELECT * FROM Customer", @aNames )

Hello,
It seems all the options are correct. If you send us a small sample (including the DB) with the error, I'll be glad to review it ASAP.
Best regards,

Is this the correct Sqlite syntax?

Publicado: Jue Ago 08, 2013 8:03 pm
por ignacio
Hello,
Sorry, taking a second look to your code I see you are not calling the Create method. Please try with Create() instead of New().
Regards,

Is this the correct Sqlite syntax?

Publicado: Vie Ago 09, 2013 12:23 am
por DC
Same issues, even with Create()


Attached files SqlLiteTest.zip (123.4 KB)Â

Is this the correct Sqlite syntax?

Publicado: Vie Ago 09, 2013 9:20 am
por ignacio
DC escribió el vie, 09 agosto 2013 00:23Same issues, even with Create()

I have just changed the word CUSTOMERS to COUNTRY and it worked. I can send you the EXE file if you want. Maybe there is something wrong with your sqlite library. I really do not know, just guessing.
Regards,

Is this the correct Sqlite syntax?

Publicado: Vie Ago 09, 2013 1:02 pm
por DC
Sorry, I screwed up the sample that was sent. The Customer table reference, from was a database Chinook_Sqlite.sqlite, that was too large to send.
But it doesn't matter whether I use the Customer table for Chinook, or Country for World. I still don't get any results. It looks like it connects and Opens the recordset correctly. But the arrays return nothing.
I'm wondering if maybe some of the other Sqlite manager DLLs are inadvertently being called, instead of the embedded one with Xailer. I'll look around, try to find the Xailer DLL, and put it in the working folder, to see if that makes a differernce.

Is this the correct Sqlite syntax?

Publicado: Vie Ago 09, 2013 1:30 pm
por DC
Nope, no luck on the DLL front.
Hate to say it, but I went ahead and tried some of the MiniGui Sqlite routines, and they do return some rows.
Maybe this requires a re-install of Xailer, from scratch.

Is this the correct Sqlite syntax?

Publicado: Vie Ago 09, 2013 8:21 pm
por ignacio
DC escribió el vie, 09 agosto 2013 13:30Nope, no luck on the DLL front.
Hate to say it, but I went ahead and tried some of the MiniGui Sqlite routines, and they do return some rows.
Maybe this requires a re-install of Xailer, from scratch.

Please confirm you are using the enterprise version of Xailer. TIA. BTW, I suggest you also try the SQLite samples included on samplesdatacontrols directory.
Regards,

Is this the correct Sqlite syntax?

Publicado: Vie Ago 09, 2013 10:02 pm
por DC
Nope, it's the Professional version, as far as I know.
That's the answer, understood. Ok, I'll locate some third party DLLs, and make use of those, thanks.

Is this the correct Sqlite syntax?

Publicado: Lun Ago 12, 2013 7:58 pm
por ignacio
DC escribió el vie, 09 agosto 2013 22:02Nope, it's the Professional version, as far as I know.
That's the answer, understood. Ok, I'll locate some third party DLLs, and make use of those, thanks.

I apologize for not being able to discover the problem before. Sorry.
Regards,

Is this the correct Sqlite syntax?

Publicado: Mar Ago 13, 2013 12:57 pm
por DC
No big deal, Ignacio. It happens. (A lot, at my office).