In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Is this the correct Sqlite syntax?

Xailer professional forum in English
Responder
DC
Mensajes: 135
Registrado: Lun May 16, 2011 6:06 pm

Is this the correct Sqlite syntax?

Mensaje 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 )
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9442
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Is this the correct Sqlite syntax?

Mensaje 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,
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9442
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Is this the correct Sqlite syntax?

Mensaje 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,
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
DC
Mensajes: 135
Registrado: Lun May 16, 2011 6:06 pm

Is this the correct Sqlite syntax?

Mensaje por DC »

Same issues, even with Create()


Attached files SqlLiteTest.zip (123.4 KB)Â
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9442
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Is this the correct Sqlite syntax?

Mensaje 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,
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
DC
Mensajes: 135
Registrado: Lun May 16, 2011 6:06 pm

Is this the correct Sqlite syntax?

Mensaje 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.
DC
Mensajes: 135
Registrado: Lun May 16, 2011 6:06 pm

Is this the correct Sqlite syntax?

Mensaje 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.
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9442
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Is this the correct Sqlite syntax?

Mensaje 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,
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
DC
Mensajes: 135
Registrado: Lun May 16, 2011 6:06 pm

Is this the correct Sqlite syntax?

Mensaje 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.
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9442
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Is this the correct Sqlite syntax?

Mensaje 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,
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
DC
Mensajes: 135
Registrado: Lun May 16, 2011 6:06 pm

Is this the correct Sqlite syntax?

Mensaje por DC »

No big deal, Ignacio. It happens. (A lot, at my office).
Responder