RE: [sqlite] Difficulty with sqlite3.3.6 under VisualStudio.net
The warnings are normal and unless you want to rewrite sqlite, not much you can do about them. Not sure about the run-time check failure _ From: Dixon Hutchinson [mailto:[EMAIL PROTECTED] Sent: Wednesday, 20 September 2006 8:41 AM To: sqlite-users@sqlite.org Subject: [sqlite] Difficulty with sqlite3.3.6 under VisualStudio.net I am having difficulty getting a clean build under Visual Studio. I believe I have followed the advice given at http://www.sqlite.org/cvstrac/wiki?p=VsNetSolution. I am getting lots of errors of the sort: ...\\sqlite3\\vdbemem.c(194) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data ...\\sqlite3\\vdbemem.c(319) : warning C4244: '=' : conversion from 'double' to 'i64', possible loss of data ...\\sqlite3\\vdbemem.c(779) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'int' ...\\sqlite3\\vdbeaux.c(531) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data ...\\sqlite3\\vdbeaux.c(564) : warning C4018: '<=' : signed/unsigned mismatch ...\\sqlite3\\vdbeaux.c(659) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data I could just turn off the warnings, but that seems kind of wreckless. The output from the compile is attached. I am also getting: Run-Time Check Failure #2 - Stack around the variable 'ts' was corrupted." This is in vdbe.c Although it is not at the same variable every time. I am running a single threaded app. This is what has lead me to want to fix the compiler warnings. Any suggestions? I'm hoping for a recommended change in my preprocessors settings. Drastic modifications to sqlite does not seem appropriate. Current preprocessor definitions are: WIN32 WINVER=0x0500 _WIN32_WINNT=0x0500 _DEBUG _WINDOWS _USRDLL NO_TCL SQLITE3_EXPORTS _WINDLL _UNICODE UNICODE
[sqlite] INSERT into a whole table at once
I have a big table and I want to change all the values in a row to the same thing but I'm not sure what key word would allow me to do this. I tried things like: INSERT INTO Table ALL VALUES ("test"); But it has an error on the ALL. I tried putting the ALL in lots of different places but it didn't work. I also tried * as a wildcard in the place where you normally specify columns but that didn't work either. There is a way to do this right? Richard - To unsubscribe, send email to [EMAIL PROTECTED] -
RE: [sqlite] Re: Which API to use to get resultant of query
> Ya now i am getting error code which says SQLITE_DONE...so how can get my > resultant now? > Which API i should use?Please tell me After running prepare, you can get the data like this: //This while loop will step through every row one by one while (sqlite3_step(pStmt) == SQLITE_ROW) { //This will store the data from the first column in the row char* cData = (const char*)sqlite3_column_text(pStmt, 0); //to get data from additional columns, just specify which one in that//last value, like so: char* cData2 = (const char*)sqlite3_column_text(pStmt, 1); } //Don't forget to call this when you're done: sqlite3_finalize(pStmt); --- Hope that helps Richard - To unsubscribe, send email to [EMAIL PROTECTED] -
RE: [sqlite] Retrieving data
> > I tried: > > sqlite3_exec(AccDataBase,"SELECT Name,Address FROM Accounts WHERE > MemberNo = > > 2;",Callback(cError,10,,),test,); > > You don't need a Callback-Function in any case. Try it > without I'm confused. How does the SELECT command return any data? In what form would it give you this data back? There doesn't seem to be a pointer to pass by reference and no out variables. Rick - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Retrieving data
Hi all. I'm using sqlite in VC++ 2005. When I started this I knew nothing about sqlite or indeed SQL at all so its been tough going trying to work out how this all works. So far I have created a database and a table and added columns and rows filled with data. But I'm having trouble retrieving that data. Lets say I have the columns MemberNo, Name and Address. I want to use a specific MemberNo to retrieve a name and address and store them in separate variables. I tried: sqlite3_exec(AccDataBase,"SELECT Name,Address FROM Accounts WHERE MemberNo = 2;",Callback(cError,10,,),test,); Now I don't fully understand how the callback part works so I just made the variables that seemed appropriate and threw them in. I thought the "result" one was supposed to get filled by the result of the SELECT, but it wasn't. When I ran this, no error was returned but the callback didn't seem to do anything. So is this the correct command to use? Is there a better/easier way? Rick - To unsubscribe, send email to [EMAIL PROTECTED] -
RE: [sqlite] building sqlite.lib
> Download the source with the .DEF file, then run: > > LIB /DEF:sqlite.def > > That will make a lib file. Pardon my ignorance, but run how? What sort of command is that? I tried in the dos shell that obviously didn't work, oh I'm running win XP if that makes a difference. Where do I run this command? Rick - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] building sqlite.lib
Hi. I'm trying to use sqlite with VC++ 2005, I downloaded the sqlitedll-3_3_7.zip but it seems I need a .lib file as well. Does anyone know where I can get one? After reading some messages here, I tried building the source as a .dll project but all I got was the .dll it didn't make a .lib I'm surprised that when you download the .dll it doesn't come with the .lib So can someone either send me this file or explain how to make it? Thanks Rick - To unsubscribe, send email to [EMAIL PROTECTED] -