No such table ?!
-
- Posts: 12
- Joined: Sun 24 Jun 2012 05:55
No such table ?!
Hello,
with C++ Builder XE2, i open my base like this ( without error )
SQLConnection->LibraryName = "dbexpsqlite40.dll"; // <library name> depends on your IDE version. See the table below.
SQLConnection->VendorLib = "sqlite3.dll";
SQLConnection->GetDriverFunc = "getSQLDriverSQLite";
SQLConnection->DriverName = "DevartSQLite";
SQLConnection->ConnectionName = "Devart SQLite";
SQLConnection->LoginPrompt = false;
SQLConnection->Params->Values["Database"] = "c:\\bd\\mabase.db";
SQLConnection->Open();
and when i do : "select * from Societe"
i have this error : "no such table : Societe"
i'm sure the table exist :
with cmd :
c:\BD\sqlite3 mabase.db
if i enter the command : '.tables', it display : "Societe"
what happens ?
TIA
with C++ Builder XE2, i open my base like this ( without error )
SQLConnection->LibraryName = "dbexpsqlite40.dll"; // <library name> depends on your IDE version. See the table below.
SQLConnection->VendorLib = "sqlite3.dll";
SQLConnection->GetDriverFunc = "getSQLDriverSQLite";
SQLConnection->DriverName = "DevartSQLite";
SQLConnection->ConnectionName = "Devart SQLite";
SQLConnection->LoginPrompt = false;
SQLConnection->Params->Values["Database"] = "c:\\bd\\mabase.db";
SQLConnection->Open();
and when i do : "select * from Societe"
i have this error : "no such table : Societe"
i'm sure the table exist :
with cmd :
c:\BD\sqlite3 mabase.db
if i enter the command : '.tables', it display : "Societe"
what happens ?
TIA
Last edited by Thierry0726 on Mon 25 Jun 2012 20:16, edited 2 times in total.
Re: No such table ?!
Please make sure that the table name is spelled correctly.
For example, the table name may contain some Unicode characters that have the same outline as English letters "o", "c", "i", "e", but the different character code.
If the table name is correct and the problem persists, try to create a small database with the table that causes the error, and send it to us.
For example, the table name may contain some Unicode characters that have the same outline as English letters "o", "c", "i", "e", but the different character code.
If the table name is correct and the problem persists, try to create a small database with the table that causes the error, and send it to us.
-
- Posts: 12
- Joined: Sun 24 Jun 2012 05:55
Re: No such table ?!
ok thanks,
If i understand well, file name must be ansi or ascii ( extended ) but NOT Unicode ?
i just try to open my table like this :
try
{
SQLQuery1->SQL->Clear();
SQLQuery1->SQL->Add("select * from Societe");
SQLQuery1->Active = true; // <-- error ; no such table
}
catch(...)
{
}
Before, i initialize my SQLConnection ( see my previous post ) and of course :
SQLQuery1->SQLConnection = SQLConnection;
even with this declaration to use ascci string but it doesn't work :
AnsiString MaChaine = "c:\\bd\\mabase.db";
SQLConnection->Params->Values["Database"] = MaChaine;
TIA
If i understand well, file name must be ansi or ascii ( extended ) but NOT Unicode ?
i just try to open my table like this :
try
{
SQLQuery1->SQL->Clear();
SQLQuery1->SQL->Add("select * from Societe");
SQLQuery1->Active = true; // <-- error ; no such table
}
catch(...)
{
}
Before, i initialize my SQLConnection ( see my previous post ) and of course :
SQLQuery1->SQLConnection = SQLConnection;
even with this declaration to use ascci string but it doesn't work :
AnsiString MaChaine = "c:\\bd\\mabase.db";
SQLConnection->Params->Values["Database"] = MaChaine;
TIA
-
- Posts: 12
- Joined: Sun 24 Jun 2012 05:55
Re: No such table ?!
Hello
If i do this with cmd, it works ! so my table exist
a problem with dbexpress or devart driver ? i'm very surprised and i do no what to do...
If i do this with cmd, it works ! so my table exist
a problem with dbexpress or devart driver ? i'm very surprised and i do no what to do...
Re: No such table ?!
Unfortunately, we still cannot reproduce the problem.
Please create a small database with the table that causes the error and send it to eugeniyz*devart*com.
Please create a small database with the table that causes the error and send it to eugeniyz*devart*com.
-
- Posts: 12
- Joined: Sun 24 Jun 2012 05:55
Re: No such table ?!
ok, thanks, i send it now
regards
regards
-
- Posts: 12
- Joined: Sun 24 Jun 2012 05:55
Re: No such table ?!
hi
did you received my mail ?
tia
did you received my mail ?
tia
Re: No such table ?!
In your example, please try to remove spaces before and after "=" in the line:
AnsiString l_sNomBase = "DataBase = c:\\bd\\mabase.db";
like this:
AnsiString l_sNomBase = "DataBase=c:\\bd\\mabase.db";
When you are trying to add a "Param=Value" string to TStringList, the line divides into the name of the parameter and its value in the position of the "=" character. So, you get the name of the parameter as "Database " and its value as " c:\\bd\\mabase.db", with the leading space in it.
AnsiString l_sNomBase = "DataBase = c:\\bd\\mabase.db";
like this:
AnsiString l_sNomBase = "DataBase=c:\\bd\\mabase.db";
When you are trying to add a "Param=Value" string to TStringList, the line divides into the name of the parameter and its value in the position of the "=" character. So, you get the name of the parameter as "Database " and its value as " c:\\bd\\mabase.db", with the leading space in it.
-
- Posts: 12
- Joined: Sun 24 Jun 2012 05:55
Re: No such table ?!
Yessssssss !
it works fine, thank you !!!
it works fine, thank you !!!