Hello.
I am posting this topic in this forum because I do not know how to check which ZeosLib version I have installed on C++Builder 6.0 Professional Edition.
I have chosen sqlite-3 Protocol for the TZConnection component.
The SQL select command bellow raises an EZSQLEception (SQL logic error or missing database) when I call the Open method, but it does not raise any exception at design time ( data shownn in a grid!) and runs fine on "SQLite Expert Personal 3":
[SQL]
SELECT usr.apuser, IFNULL( usr.name, usr.username ) AS name
FROM apuser usr
WHERE
UPPER(usr.username) = UPPER(:usrname) AND
(usr.password IS NULL
OR UPPER(usr.password) = UPPER(:pwd)) AND
usr.status = 'S'
[/SQL]
What am I doing wrong ?
Thanks a lot.
Jayme Jeffman Filho
[solved] ZeosLib version and SQLite error
Moderators: gto, EgonHugeist
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
jjeffman,
did you assign the Parameters? In ZClasses.pas is a constant which declares the Major, Minior and Release Vesion+ stable/beta/alfa. But no SVN version is availabe..
did you assign the Parameters? In ZClasses.pas is a constant which declares the Major, Minior and Release Vesion+ stable/beta/alfa. But no SVN version is availabe..
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
Thank you for answering.
Yes I did.
Parameter "pwd" should may have a null value, and it works at design time.
I was not able to check if the value assignment is working because Zeos components do not behave the same way CBuilders' do.
My Zeos version is ZEOS_VERSION = '6.6.6-stable';
Yes I did.
Parameter "pwd" should may have a null value, and it works at design time.
Code: Select all
QAppLogin->Close();
QAppLogin->ParamByName("pwd")->Clear();
QAppLogin->ParamByName("usrname")->AsString = cAppUser;
if(cAppPwd.Length() > 0)
QAppLogin->ParamByName("pwd")->AsString = cAppPwd;
QAppLogin->Open();
My Zeos version is ZEOS_VERSION = '6.6.6-stable';
I have found the problem, at runtime the column name "password" is not permited although it runs perfectly at design time. Perhaps it is a component bug because SQLite allows naming a column as "password".
Is there a way around of this without changing the column name ? Like MySQL putting the column name between special quotes.
I have tried all options given at http://www.sqlite.org/lang_keywords.html, all of them are suported by "SQLite Express Personal 3" but none of them has worked on TZReadOnlyQuery.
Thank you very much.
Is there a way around of this without changing the column name ? Like MySQL putting the column name between special quotes.
I have tried all options given at http://www.sqlite.org/lang_keywords.html, all of them are suported by "SQLite Express Personal 3" but none of them has worked on TZReadOnlyQuery.
Thank you very much.
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
jjeffman,
hmm currently i can't see what should be going wrong. IMHO your code should work. Which compiler do you use? Can you provide a little template app which points me to this issue? Also would it be a good idea to update to Zeos7-7.0.1-Beta or SVN. Then we are on the same bandwidth..
hmm currently i can't see what should be going wrong. IMHO your code should work. Which compiler do you use? Can you provide a little template app which points me to this issue? Also would it be a good idea to update to Zeos7-7.0.1-Beta or SVN. Then we are on the same bandwidth..
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
I have made a simple C++Builder application using the same SQLite table structure which I have failed on perform a SQL select to perform user login to the application.
When testing the application I saw it was working perfectly. The diferences are :
1. I have said it works at design time. The SQL parameters are set through the IDE, not by code;
2. On the new application I am using the Borland's "InputQuery" function to get the SQL parameters;
So the problem must be on the way I am passing parameters at runtime on the old application. I will go after the solution checking the parameters values. They can have been corrupted by the way I am getting them.
Thank you very much.
Kind regards.
When testing the application I saw it was working perfectly. The diferences are :
1. I have said it works at design time. The SQL parameters are set through the IDE, not by code;
2. On the new application I am using the Borland's "InputQuery" function to get the SQL parameters;
So the problem must be on the way I am passing parameters at runtime on the old application. I will go after the solution checking the parameters values. They can have been corrupted by the way I am getting them.
Thank you very much.
Kind regards.
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
jjeffman,
Allways nice to heare it works!
Allways nice to heare it works!
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/