BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SQLite BCB3

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop)
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Wed Aug 09, 2006 9:37 pm    Post subject: SQLite BCB3 Reply with quote



Hey yall, i'm trying to use SQLite3 with Borland C++ Builder 3.0
Professional. To setup SQLite I used Remy Lebeau's instructions as
listed here

http://groups.google.com/group/borland.public.cppbuilder.students/browse_thread/thread/967c6ccd741835a9/a6a6ec014fb158ea?lnk=st&q=&rnum=1&hl=en#a6a6ec014fb158ea

1) File > New > Library
2) Add all of the .c files from the SQLLite source into the library
(except
the shell.c and tclsqlite.c files)
3) Build the library
4) add the compiled .lib file to your main project
5) #include the sqlite.h header file

I did this and it works fine with a console application using the VCL.

Unfortunately it does not work with a windows application.

Does anyone have a clue why???

Code:
void __fastcall TfrmMain::Button1Click(TObject *Sender) {
char *zErrMsg, **result;
char buffer[80];
int rc, fcnt, rcnt;
sqlite3 *db;

rc = sqlite3_open("Test01.db", &db);
if (rc != SQLITE_OK) {
txtMessage->Text = "Could not open database!";
return;
}//end if

strcpy(buffer, "create table tblTest (testID integer)");

rc = sqlite3_get_table(db, buffer, &result, &rcnt, &fcnt, &zErrMsg);

if (rc != SQLITE_OK) {
txtMessage->Text = zErrMsg;
sqlite3_free(zErrMsg);
} else {
txtMessage->Text = "Success!";
}//end if
sqlite3_free_table(result);
}

Error Message:
malformed database schema - near "BLE": syntax error


TIA,
JJ
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.