Re: [sqlite] Problem with Multiple INSERT, SQLite C driver issue ?

2014-03-31 Thread Bertini, Denis Dr.
INTO 'tablename' ('column1', 'column2') VALUES ('data1', 'data2'), ('data1', 'data2'), ('data1', 'data2'), ('data1', 'data2'); It works as it should for SQLite 3.7.11 and above. But, when trying to execute the same command from the SQLIte C driver I'm not sure what the SQLite C

[sqlite] Problem with Multiple INSERT, SQLite C driver issue ?

2014-03-28 Thread Bertini, Denis Dr.
3.7.11 and above. But, when trying to execute the same command from the SQLIte C driver i got an SQL syntax error statement , error near ,. Apparently for the the same syntax can not be executed via the sqlite3_exec() function. To execute the SQL statement i use the std exec() function: int ret

Re: [sqlite] Problem with Multiple INSERT, SQLite C driver issue ?

2014-03-28 Thread Richard Hipp
'), ('data1', 'data2'), ('data1', 'data2'); It works as it should for SQLite 3.7.11 and above. But, when trying to execute the same command from the SQLIte C driver I'm not sure what the SQLite C driver is. Run this test please: Evaluate the following using SQLite C driver: SELECT

[sqlite] C# - SQLite - and other things

2014-02-13 Thread Incongruous
After downloading sqlite-netFx451-static-binary-x64-2013-1.0.90.0 and uncompressing it, I got this list of file: Installer.exe Installer.pdb northwindEF.db SQLite.Designer.dll SQLite.Designer.pdb SQLite.Designer.xml SQLite.Interop.dll SQLite.Interop.pdb sqlite_file_list.txt

Re: [sqlite] C# - SQLite - and other things

2014-02-13 Thread Joe Mistachkin
Incongruous wrote: After downloading sqlite-netFx451-static-binary-x64-2013-1.0.90.0 and uncompressing it, I got this list of file: I think using the System.Data.SQLite NuGet package would be better in this case. The package is here (it can also be found by searching in the Visual Studio

[sqlite] SQLite C# differences between Windows Server 2008 and 2003

2013-06-20 Thread james.johns...@mysmartplans.com
Hello, I am using System.Data.SQLite.dll version 1.0.82.0 and SQLite.Interop.dll to connect to some SQLite databases using C# Web Services. The code is working fine on Windows Server 2008, but on 2003 it is not releasing the database at the end of the call. It is extremely simple code,

Re: [sqlite] SQLite C# differences between Windows Server 2008 and 2003

2013-06-20 Thread eschneider FE
' Subject: [sqlite] SQLite C# differences between Windows Server 2008 and 2003 Hello, I am using System.Data.SQLite.dll version 1.0.82.0 and SQLite.Interop.dll to connect to some SQLite databases using C# Web Services. The code is working fine on Windows Server 2008, but on 2003 it is not releasing

Re: [sqlite] SQLite C# differences between Windows Server 2008 and 2003

2013-06-20 Thread james.johns...@mysmartplans.com
of SQLite Database' Subject: Re: [sqlite] SQLite C# differences between Windows Server 2008 and 2003 Can you post the code? And why do you need to use the SQLite.Interop.dll ? -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf

Re: [sqlite] SQLite C# differences between Windows Server 2008 and 2003

2013-06-20 Thread eschneider FE
To: 'General Discussion of SQLite Database' Subject: Re: [sqlite] SQLite C# differences between Windows Server 2008 and 2003 Sure here is the code. using (SQLiteConnection sql_con = new SQLiteConnection(Data Source=C:\\Path\\To\\File\\docuidb.db;)) { sql_con.Open

Re: [sqlite] Newbie issues with SQLite C#

2012-12-03 Thread William Drago
Hi Joe, Thanks for the excellent reply. Putting SQLite.Interop.dll in my bin\Debug folder solved the problem. I did read the download page and the faq page, but most of that stuff is gibberish to me and not beginner friendly at all. But all's well that ends well. I created some tables with

[sqlite] Newbie issues with SQLite C#

2012-12-02 Thread William Drago
All, This is my first post to this group... I'm hoping someone can help me. I've just wasted nearly 8 hours trying to get SQLite to work with a C# program in Visual Studio 10 (32bit WinXP, .NET 4.0). Here are the issues: 1) I'm not really sure how to install SQLite. I downloaded

Re: [sqlite] Newbie issues with SQLite C#

2012-12-02 Thread Joe Mistachkin
William Drago wrote: 1) I'm not really sure how to install SQLite. I downloaded sqlite-netFx40-setup-x86-2010-1.0.82.0.exe and ran setup. Installing System.Data.SQLite is only necessary if you need the Visual Studio design-time components. Is that all it takes? That depends on how the

[sqlite] C++ - Sqlite3 and Visual Studio 10

2012-10-08 Thread Arbol One
When trying to port my application from Code::Blocks(windows version) to Visual Studio 10, I am getting some error, similar to the one below: 1my_sqlite3.obj : error LNK2019: unresolved external symbol _sqlite3_prepare_v2 referenced in function public: bool __thiscall mySQLite3::notExist(class

Re: [sqlite] C++ - Sqlite3 and Visual Studio 10

2012-10-08 Thread Clemens Ladisch
Arbol One wrote: error LNK2019: unresolved external symbol _sqlite3_prepare_v2 It appears you forgot to include sqlite3.c in your application. Regards, Clemens This e-mail is for the sole use of the intended recipient and may contain confidential or privileged information. Unauthorized use

Re: [sqlite] C++ - Sqlite3 and Visual Studio 10

2012-10-08 Thread Arbol One
@sqlite.org Subject: Re: [sqlite] C++ - Sqlite3 and Visual Studio 10 Arbol One wrote: error LNK2019: unresolved external symbol _sqlite3_prepare_v2 It appears you forgot to include sqlite3.c in your application. Regards, Clemens This e-mail is for the sole use of the intended recipient and may

Re: [sqlite] c++ - Tell SQLite3, read the subsequent rows

2012-09-14 Thread Rob Richardson
Igor, you didn't read ArbolOne's incomprehensible code correctly. Here it is with reasonable formatting: void mySQLite3::setStmt(const Glib::ustring s) { SQLStatement = s; if (mystmt == NULL) { rc =

[sqlite] c++ - Tell SQLite3, read the subsequent rows

2012-09-13 Thread ArbolOne
I have been able to write to the databaserepeatedly; several records have been added to it in a table named ‘name’ tolook like this: Id - tile - fname - mname - lname 100 - Mr - Me - Who - Papá 101 - Mrs - She - What - Mamá 102 - Mr - He - Who - Papá I am now trying to read all the

Re: [sqlite] c++ - Tell SQLite3, read the subsequent rows

2012-09-13 Thread Igor Tandetnik
ArbolOne arbol...@gmail.com wrote: I would like to know how does one tell SQLite3 to read the subsequent rows using the C/C++ API. One calls sqlite3_step whenever one wishes to advance to the next row. void mySQLite3::setStmt(const Glib::ustring s) { SQLStatement = s; if (mystmt == NULL) {

Re: [sqlite] C++ - HOW MANY rows?

2012-09-12 Thread Black, Michael (IS)
-boun...@sqlite.org] on behalf of Arbol One [arbol...@gmail.com] Sent: Tuesday, September 11, 2012 9:44 PM To: 'General Discussion of SQLite Database' Subject: EXT :Re: [sqlite] C++ - HOW MANY rows? Thanks Igor for your prompt response. Since the call to the sqlite3_step function is inside

Re: [sqlite] C++ - HOW MANY rows?

2012-09-12 Thread Arbol One
much for your help and have a wonderful day. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik Sent: Tuesday, September 11, 2012 11:24 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] C++ - HOW MANY rows? Arbol

Re: [sqlite] C++ - HOW MANY rows?

2012-09-12 Thread Simon Slavin
On 12 Sep 2012, at 6:31pm, Arbol One arbol...@gmail.com wrote: Look, Sir, I appreciate that you have spend your time and energy responding to my question, in fact, I have used your suggestion to have a look at the other guys' C++ wrappers of the SQLite3 library, but my intention is to learn

Re: [sqlite] C++ - HOW MANY rows?

2012-09-12 Thread Arbol One
yes, it worked, thanks Michael. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Black, Michael (IS) Sent: Wednesday, September 12, 2012 8:13 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] C++ - HOW MANY

Re: [sqlite] C++ - HOW MANY rows?

2012-09-12 Thread Igor Tandetnik
On 9/12/2012 1:31 PM, Arbol One wrote: Just so that we are clear, I don't mind trying and failing a thousand times, Well, the participants in this list might not possess quite as infinite a patience. If you plan to post a what am I doing wrong type of message to the list a thousand times

[sqlite] C# access to SQLite and Windows 8

2012-09-11 Thread Nicolas Rivera
Hi, If you have seen this message already, please ignore it. I received some sort of email about message content type from the forum, and I am resending it as text just in case. Currently at my job I am writing code to access SQLite from C# using System.Data.SQLite. We are also looking at

Re: [sqlite] : C# access to SQLite and Windows 8

2012-09-11 Thread Black, Michael (IS)
Have you looked at this? http://timheuer.com/blog/archive/2012/08/07/updated-how-to-using-sqlite-from-windows-store-apps.aspx Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems _

Re: [sqlite] : C# access to SQLite and Windows 8

2012-09-11 Thread Nicolas Rivera
Have you looked at this? http://timheuer.com/blog/archive/2012/08/07/updated-how-to-using-sqlite-from-windows-store-apps.aspx Thanks for that link. Yes, I have looked at it before. Just to make it clear, I know that, according to that blog, sqlite-net will work from Metro and desktop. I

[sqlite] C++ - HOW MANY rows?

2012-09-11 Thread Arbol One
I read my newly created database using this method: void Runner::read_tblName() { . sql_statement = SELECT * FROM name; db-setStmt(sql_statement); int pos = 0; data1 = db-read_int(pos); db-setStmt(sql_statement); pos = 1; data2 = db-read_str(pos);

Re: [sqlite] C++ - HOW MANY rows?

2012-09-11 Thread Igor Tandetnik
On 9/11/2012 7:28 PM, Arbol One wrote: This works just fine, but it only reads the first row Of course. You only ever call sqlite3_step step after prepare and before finalize. how can I 'tell' my program HOW MANY rows are there to be read and which row I WANT TO READ? You are supposed to

Re: [sqlite] C++ - HOW MANY rows?

2012-09-11 Thread Igor Tandetnik
On 9/11/2012 7:37 PM, Igor Tandetnik wrote: On 9/11/2012 7:28 PM, Arbol One wrote: This works just fine, but it only reads the first row Of course. You only ever call sqlite3_step step after prepare and before finalize. I mean, you only ever call sqlite3_step *once* after prepare and before

Re: [sqlite] C++ - HOW MANY rows?

2012-09-11 Thread Arbol One
Thanks Igor for your prompt response. Since the call to the sqlite3_step function is inside the mySQLite3::read_* class-function/method, I call the read_* method from Runner::read_tblName() for each datum I need to retrieve. Now, in a while loop inside Runner::read_tblName() I could call the

Re: [sqlite] C++ - HOW MANY rows?

2012-09-11 Thread Igor Tandetnik
Arbol One arbol...@gmail.com wrote: Since the call to the sqlite3_step function is inside the mySQLite3::read_* class-function/method ... it is clear that you have a poor class design. As you would generally want to read several columns from the same row, it is unwise to have a read_* method

[sqlite] C++ - WHERE clause - 2nd update

2012-09-07 Thread Arbol One
I got this code to work, however, I am getting a segmentation fault on this code. I pass to SQLite only one statement [db-setStmt(apstr);], I read the first of the 'fname', but I don't know how to get to the second 'fname' in the database. I am not very sure as to what do to tell the program to

Re: [sqlite] C++ - WHERE clause - 2nd update

2012-09-07 Thread Marcus Grimm
On 07.09.2012 08:58, Arbol One wrote: I got this code to work, however, I am getting a segmentation fault on this code. I pass to SQLite only one statement [db-setStmt(apstr);], I read the first of the 'fname', but I don't know how to get to the second 'fname' in the database. I am not very

Re: [sqlite] C++ - WHERE clause - 2nd update

2012-09-07 Thread Arbol One
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Marcus Grimm Sent: Friday, September 07, 2012 3:39 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] C++ - WHERE clause - 2nd update On 07.09.2012 08:58, Arbol One wrote: I got this code to work, however, I am getting a segmentation

Re: [sqlite] C++ - WHERE clause - 2nd update

2012-09-07 Thread Black, Michael (IS)
of Arbol One [arbol...@gmail.com] Sent: Friday, September 07, 2012 4:07 AM To: 'General Discussion of SQLite Database' Subject: EXT :Re: [sqlite] C++ - WHERE clause - 2nd update Yes, thank? I gave you the answer you gave me, obviously I was right. I need you to prove me right again, how about, haaa

Re: [sqlite] C++ - WHERE clause - update

2012-09-07 Thread Rob Richardson
Discussion of SQLite Database' Subject: Re: [sqlite] C++ - WHERE clause - update Is this a tricky question? int sqlite3_step(sqlite3_stmt*); -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Rob Richardson Sent: Thursday, September

Re: [sqlite] C++ - WHERE clause - update

2012-09-07 Thread Simon Slavin
On 7 Sep 2012, at 2:18pm, Rob Richardson rdrichard...@rad-con.com wrote: One number (I don't know off hand which) is labeled SQLITE_ROW, which you are using. Another is SQLITE_DONE. Another is SQLITE_MISUSE. There are several of them. Quite right.

[sqlite] C++ - WHERE clause

2012-09-06 Thread Arbol One
As many of you know, I am trying to learn SQL using C++. Below is an error I get when I try using the C++ example below it. Error Code: 1 Error Message: near VALUES: syntax error Glib::ustring apstr; Glib::ustring sName; int

Re: [sqlite] C++ - WHERE clause

2012-09-06 Thread Baruch Burstein
VALUES is used for INSERTing into a table, not for SELECTing. This is not valid SQL (I would help you fix it, but I can't figure out what you were trying to achieve.) Here is a great reference: http://sqlite.org/lang_select.html On Thu, Sep 6, 2012 at 11:18 AM, Arbol One arbol...@gmail.com wrote:

Re: [sqlite] C++ - WHERE clause

2012-09-06 Thread Stephan Beal
On Thu, Sep 6, 2012 at 10:18 AM, Arbol One arbol...@gmail.com wrote: As many of you know, I am trying to learn SQL using C++. FWIW: it's much easier to learn SQL in its native environment (e.g. by using the sqlite shell app) and then apply that learning to your programming language of choice.

Re: [sqlite] C++ - WHERE clause

2012-09-06 Thread Black, Michael (IS)
...@sqlite.org] on behalf of Baruch Burstein [bmburst...@gmail.com] Sent: Thursday, September 06, 2012 3:45 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite] C++ - WHERE clause VALUES is used for INSERTing into a table, not for SELECTing. This is not valid SQL (I would help you

Re: [sqlite] C++ - WHERE clause

2012-09-06 Thread Richard Hipp
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Baruch Burstein [bmburst...@gmail.com] Sent: Thursday, September 06, 2012 3:45 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite] C++ - WHERE clause VALUES is used

Re: [sqlite] C++ - WHERE clause

2012-09-06 Thread Black, Michael (IS)
Yeah -- I should've been in a better teaching mode Trying to keep things simple opens up these type of security problemsthough there are lots of situations where this works just fine and is no problem at all (e.g. when you don't have user input or it's completely under your own control

[sqlite] C++ - WHERE clause - update

2012-09-06 Thread Arbol One
rc = sqlite3_step(mystmt); if(rc == SQLITE_ROW ) { The code, in this case, does not process this statement!!?? -- apstr = (const char*)sqlite3_column_text(mystmt,pos); std::cout apstr std::endl; //-- this is not executed } Table: id | tile | fname | mname | lname |

Re: [sqlite] C++ - WHERE clause - update

2012-09-06 Thread Rob Richardson
What is the value returned from sqlite3_step()? RobR -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Arbol One Sent: Thursday, September 06, 2012 12:14 PM To: 'General Discussion of SQLite Database' Subject: [sqlite] C

Re: [sqlite] C++ - WHERE clause - update

2012-09-06 Thread Igor Tandetnik
On 9/6/2012 12:14 PM, Arbol One wrote: rc = sqlite3_step(mystmt); if(rc == SQLITE_ROW ) { The code, in this case, does not process this statement!!?? It's possible that no row actually matches the condition, so sqlite3_step returns SQLITE_DONE on the first call. -- Igor Tandetnik

Re: [sqlite] C++ - WHERE clause - update

2012-09-06 Thread Arbol One
: [sqlite] C++ - WHERE clause - update What is the value returned from sqlite3_step()? RobR -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Arbol One Sent: Thursday, September 06, 2012 12:14 PM To: 'General Discussion of SQLite

Re: [sqlite] C# Dynamic data type

2012-08-08 Thread Adam DeVita
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Adam DeVita [adev...@verifeye.com] Sent: Tuesday, August 07, 2012 10:26 AM To: General Discussion of SQLite Database Subject: EXT :[sqlite] C# Dynamic data type Good day, I've been reading a bit

[sqlite] C# Dynamic data type

2012-08-07 Thread Adam DeVita
Good day, I've been reading a bit of conflicted stuff online in terms of data type. The most basic question, in C#, is can you easily determine the data type of the Nth entry in a column. {Ex: Create table A( x TEXT, y ) ... a few inserts, binding a float, then a string, then an int into y..

Re: [sqlite] C# Dynamic data type

2012-08-07 Thread Black, Michael (IS)
, 2012 10:26 AM To: General Discussion of SQLite Database Subject: EXT :[sqlite] C# Dynamic data type Good day, I've been reading a bit of conflicted stuff online in terms of data type. The most basic question, in C#, is can you easily determine the data type of the Nth entry in a column. {Ex

[sqlite] C++ - Installer

2012-08-02 Thread Arbol One
I was wondering if there is an 'Installer' for Windows 7 that you would recommend. I want my user to have all the necessary SQLite3 files needed for my application as well as all the gtkmm files. TIA ___ sqlite-users mailing list

Re: [sqlite] C++ - Installer

2012-08-02 Thread Robert Myers
On 8/2/2012 8:40 AM, Arbol One wrote: I was wondering if there is an 'Installer' for Windows 7 that you would recommend. I want my user to have all the necessary SQLite3 files needed for my application as well as all the gtkmm files. You can create installers with WiX

Re: [sqlite] C++ - Finalizing my SQLite interface

2012-07-28 Thread Black, Michael (IS)
Database Subject: EXT :Re: [sqlite] C++ - Finalizing my SQLite interface -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 27/07/12 07:22, Arbol One wrote: Before calling the destructor, I would like to make sure that all the sqlite3_stmt have been 'finalized', is there a function in SQLite

[sqlite] C++ - Finalizing my SQLite interface

2012-07-27 Thread Arbol One
Before calling the destructor, I would like to make sure that all the sqlite3_stmt have been 'finalized', is there a function in SQLite that that can help me do this, or should I just use 'NULL'? tia ___ sqlite-users mailing list

Re: [sqlite] C++ - Finalizing my SQLite interface

2012-07-27 Thread Simon Davies
On 27 July 2012 15:22, Arbol One arbol...@gmail.com wrote: Before calling the destructor, I would like to make sure that all the sqlite3_stmt have been 'finalized', is there a function in SQLite that that can help me do this, or should I just use 'NULL'? The documentation is there to help

Re: [sqlite] C++ - Finalizing my SQLite interface

2012-07-27 Thread Jay A. Kreibich
On Fri, Jul 27, 2012 at 03:42:57PM +0100, Simon Davies scratched on the wall: On 27 July 2012 15:22, Arbol One arbol...@gmail.com wrote: Before calling the destructor, I would like to make sure that all the sqlite3_stmt have been 'finalized', is there a function in SQLite that that can help

Re: [sqlite] C++ - Finalizing my SQLite interface

2012-07-27 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 27/07/12 07:22, Arbol One wrote: Before calling the destructor, I would like to make sure that all the sqlite3_stmt have been 'finalized', is there a function in SQLite that that can help me do this, or should I just use 'NULL'? Your best bet

[sqlite] C++ - Evaluating a statement

2012-07-26 Thread Arbol One
Reading the documentation, it says that 'sqlite3_step(sqlite3_stmt*) ' must be called at least once to evaluate the statement. However, what does it evaluate? Freedom of speech does not translate to freedom of insulting ___ sqlite-users

Re: [sqlite] C++ - Evaluating a statement

2012-07-26 Thread Nico Williams
On Thu, Jul 26, 2012 at 4:32 PM, Arbol One arbol...@gmail.com wrote: Reading the documentation, it says that 'sqlite3_step(sqlite3_stmt*) ' must be called at least once to evaluate the statement. However, what does it evaluate? The prepared statement. Prepared statements are really a

[sqlite] C++ - All the data in ONE row

2012-07-25 Thread Arbol One
OK, continuing with the writing to the database, here is the driver method for the class rapper for SQLite3. The problem I have is that I have no control as to the exact location where I want the data to be stored, look the table below to have a better idea of what I mean. My question is, is

Re: [sqlite] C++ - nothing has been stored!!??

2012-07-25 Thread Eduardo Morras
At 03:27 25/07/2012, you wrote: And here I am again, asking for what you find so easy and I. well, just cannot understand. ... but this does not store anything in the database table. I have used an sqlite browser to determine if, in fact, some data was stored, but no, nothing has been

Re: [sqlite] C++ - All the data in ONE row

2012-07-25 Thread Robert Myers
On 7/25/2012 10:02 AM, Arbol One wrote: OK, continuing with the writing to the database, here is the driver method for the class rapper for SQLite3. The problem I have is that I have no control as to the exact location where I want the data to be stored, look the table below to have a better

Re: [sqlite] C++ - All the data in ONE row

2012-07-25 Thread Black, Michael (IS)
In keeping with your example what you want to do is add a done flag to your write class. So you tell it when your SQL can be executed. Something like this: void someClass::write2tblName() { stmtName = INSERT INTO name (n_id, title, fname, mname, lname) VALUES (?, ?, ?, ?, ?); int

Re: [sqlite] C++ - Creating Table

2012-07-24 Thread Robert Myers
-Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- boun...@sqlite.org] On Behalf Of Robert Myers Sent: Monday, 23 July, 2012 21:44 To: sqlite-users@sqlite.org Subject: Re: [sqlite] C++ - Creating Table On 7/23/2012 7:43 PM, Arbol One wrote: Thank you Michael for your

[sqlite] C++ - sqlite3_extended_result_codes(

2012-07-24 Thread Arbol One
I would like to turn on the extended result codes, however, the prototype below does not explain what the value for the second parameter should be. Can anybody help? int sqlite3_extended_result_codes(sqlite3*, int onoff); TIA ___ sqlite-users

Re: [sqlite] C++ - sqlite3_extended_result_codes(

2012-07-24 Thread Marc L. Allen
] On Behalf Of Arbol One Sent: Tuesday, July 24, 2012 4:13 PM To: SqLite Subject: [sqlite] C++ - sqlite3_extended_result_codes( I would like to turn on the extended result codes, however, the prototype below does not explain what the value for the second parameter should be. Can anybody help? int

Re: [sqlite] C++ - sqlite3_extended_result_codes(

2012-07-24 Thread Richard Hipp
On Tue, Jul 24, 2012 at 4:13 PM, Arbol One arbol...@gmail.com wrote: I would like to turn on the extended result codes, however, the prototype below does not explain what the value for the second parameter should be. Can anybody help? int sqlite3_extended_result_codes(sqlite3*, int onoff);

Re: [sqlite] C++ - sqlite3_extended_result_codes(

2012-07-24 Thread Arbol One
Thanks everyone, I just wanted to be sure. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Richard Hipp Sent: Tuesday, July 24, 2012 4:16 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] C

[sqlite] C++ - nothing has been stored!!??

2012-07-24 Thread Arbol One
And here I am again, asking for what you find so easy and I. well, just cannot understand. I am trying to write to a database table previously created by another process like this: void someClass::create_tblName() { sql_param_tblName = CREATE TABLE name(n_id INTEGER PRIMARY KEY, title TEXT,

Re: [sqlite] C++ - nothing has been stored!!??

2012-07-24 Thread Igor Tandetnik
On 7/24/2012 9:27 PM, Arbol One wrote: void mySQLite3Class::write(const Glib::ustring sql_stmt, int pos, int data )throw(someException) { rc = sqlite3_prepare_v2(db, sql_stmt.c_str(), -1, stmt, NULL); if(rc != SQLITE_OK) { throw(someException)} rc = sqlite3_bind_int(stmt,

[sqlite] C++ - Creating Table

2012-07-23 Thread Arbol One
Using SQLite version 3.7.8 amalgamation, under Win7 with MinGW, I compile the bellow program, but for some strange reason I am getting a runtime error when creating the table. I hope that one of you would be able to tell me what I am doing wrong. TIA === class mySQLite3Class { private:

Re: [sqlite] C++ - Creating Table

2012-07-23 Thread Pavel Ivanov
As you don't have stmt defined anywhere this is apparently not the actual program you run. Seeing the full source code would be more helpful. If the whole source is too big try to reduce it to small program reproducing the problem. It's possible that while attempting to reduce program source

Re: [sqlite] C++ - Creating Table

2012-07-23 Thread Black, Michael (IS)
] on behalf of Arbol One [arbol...@gmail.com] Sent: Monday, July 23, 2012 1:54 PM To: SqLite Subject: EXT :[sqlite] C++ - Creating Table Using SQLite version 3.7.8 amalgamation, under Win7 with MinGW, I compile the bellow program, but for some strange reason I am getting a runtime error when creating

Re: [sqlite] C++ - Creating Table

2012-07-23 Thread Arbol One
Discussion of SQLite Database Subject: Re: [sqlite] C++ - Creating Table Just as a sanity check your code does work OK. I made it a standalone program. #include iostream #include sqlite3.h using namespace std; class mySQLite3Class { private: //SQLite3 sqlite3* db; //SQLite3 string dbName

Re: [sqlite] C++ - Creating Table

2012-07-23 Thread Robert Myers
On 7/23/2012 7:43 PM, Arbol One wrote: Thank you Michael for your prompt response. I have been able to duplicate the error message. I think this could be a bug in SQLite3. void jme::mySQLite3::createTable(const std::string s) throw (std::exception) { rc = sqlite3_prepare_v2( db, s.c_str(),

Re: [sqlite] C++ - Creating Table

2012-07-23 Thread Keith Medcalf
] On Behalf Of Robert Myers Sent: Monday, 23 July, 2012 21:44 To: sqlite-users@sqlite.org Subject: Re: [sqlite] C++ - Creating Table On 7/23/2012 7:43 PM, Arbol One wrote: Thank you Michael for your prompt response. I have been able to duplicate the error message. I think this could be a bug

Re: [sqlite] C++ programming - inserting data in a table

2012-06-25 Thread Simon Slavin
On 25 Jun 2012, at 5:16am, Arbol One arbol...@gmail.com wrote: Thanks for the prompt response. Here is the same problem when using INSERT. Read Igor's post again. The only SQL commands which produce output are SELECT and (sometimes) PRAGMA. Commands which make changes to your database,

Re: [sqlite] C++ programming - creating a table

2012-06-25 Thread Arbol One
Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik Sent: Monday, June 25, 2012 12:07 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] C++ programming - creating a table Arbol One arbol...@gmail.com wrote: create_table

Re: [sqlite] C++ programming - creating a table

2012-06-25 Thread Igor Tandetnik
Arbol One arbol...@gmail.com wrote: Q: What are you trying to achieve here? What's the supposed purpose of sqlite3_column_type call? A: What I am trying to do is to display the data in a data table You run a SELECT statement for that. In any case, what data do you expect there to be right

Re: [sqlite] C++ programming - Extracting data

2012-06-25 Thread Arbol One
...@sqlite.org] On Behalf Of Igor Tandetnik Sent: Monday, June 25, 2012 9:07 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] C++ programming - creating a table Arbol One arbol...@gmail.com wrote: Q: What are you trying to achieve here? What's the supposed purpose of sqlite3_column_type call

Re: [sqlite] C++ programming - Extracting data

2012-06-25 Thread Keith Medcalf
/\ www.asciiribbon.org -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- boun...@sqlite.org] On Behalf Of Arbol One Sent: Monday, 25 June, 2012 07:27 To: General Discussion of SQLite Database Subject: Re: [sqlite] C++ programming - Extracting data Sorry

Re: [sqlite] C++ programming - Extracting data

2012-06-25 Thread Black, Michael (IS)
' Subject: EXT :Re: [sqlite] C++ programming - Extracting data Sorry, I forgot to give you a snip of the test-bench code getter() { string sName; string sAddress; int age = 0; string dbdata = SELECT * FROM friend; rc = sqlite3_prepare_v2(db, dbdata.c_str(), -1, stmt, NULL

Re: [sqlite] C++ programming - Extracting data

2012-06-25 Thread Arbol One
To: General Discussion of SQLite Database Subject: Re: [sqlite] C++ programming - Extracting data You're not doing the right sequencing...so your cout is only executing when there is NOT a row. Change rc = sqlite3_step(stmt); if(rc != SQLITE_DONE) { ... } while ( sqlite3_step(stmt

Re: [sqlite] C++ programming - Extracting data

2012-06-25 Thread Keith Medcalf
...@sqlite.org [mailto:sqlite-users- boun...@sqlite.org] On Behalf Of Arbol One Sent: Monday, 25 June, 2012 08:31 To: General Discussion of SQLite Database Subject: Re: [sqlite] C++ programming - Extracting data I did what you suggested, you were right, now the exception is gone

Re: [sqlite] C++ programming - Extracting data

2012-06-25 Thread Black, Michael (IS)
...@gmail.com] Sent: Monday, June 25, 2012 9:30 AM To: 'General Discussion of SQLite Database' Subject: EXT :Re: [sqlite] C++ programming - Extracting data I did what you suggested, you were right, now the exception is gone, but the program now does not display anything, it just goes to the end of the method

Re: [sqlite] C++ programming - Extracting data

2012-06-25 Thread Arbol One
: [sqlite] C++ programming - Extracting data You were doing two sqlite3_step()'s instead of one. So you skipped the one record you had inserted. You can run this multiple times and you;; see error messages about the create table on 2nd and subsequent runs. Still adds the same record though so

[sqlite] C++ - ISERT from a data object

2012-06-25 Thread Arbol One
In my GUI application the user enters a information that will go in a SQLite database table, so statements like: string dbdata = INSERT INTO friend (name, address, age) VALUES ('Caramba', '490 New Bridge', '49'); are not very useful in a real life C++ GUI application. I would assume that

Re: [sqlite] C++ - ISERT from a data object

2012-06-25 Thread Simon Slavin
On 25 Jun 2012, at 11:36pm, Arbol One arbol...@gmail.com wrote: In my GUI application the user enters a information that will go in a SQLite database table, so statements like: string dbdata = INSERT INTO friend (name, address, age) VALUES ('Caramba', '490 New Bridge', '49'); are not

Re: [sqlite] C++ - ISERT from a data object

2012-06-25 Thread Robert Myers
On 6/25/2012 5:58 PM, Simon Slavin wrote: On 25 Jun 2012, at 11:36pm, Arbol One arbol...@gmail.com wrote: In my GUI application the user enters a information that will go in a SQLite database table, so statements like: string dbdata = INSERT INTO friend (name, address, age) VALUES ('Caramba',

Re: [sqlite] C++ - ISERT from a data object

2012-06-25 Thread Igor Tandetnik
Arbol One arbol...@gmail.com wrote: In my GUI application the user enters a information that will go in a SQLite database table, so statements like: string dbdata = INSERT INTO friend (name, address, age) VALUES ('Caramba', '490 New Bridge', '49'); are not very useful in a real life

Re: [sqlite] C++ - ISERT from a data object

2012-06-25 Thread Arbol One
My friend, heavens awaits you. Outstanding! Thanks man! -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik Sent: Monday, June 25, 2012 7:32 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] C++ - ISERT from

Re: [sqlite] C++ - ISERT from a data object

2012-06-25 Thread Keith Medcalf
are not very useful in a real life C++ GUI application. That thing you quoted above ... the thing between the double quotes ... is a string. You can make up the string yourself by concatenating several strings together. I may be a bit oversensitive here, but that seems like an

[sqlite] C++ programming - SELECT question

2012-06-24 Thread Arbol One
A pessimist is one who makes difficulties of his opportunities and an optimist is one who makes opportunities of his difficulties. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] C++ programming - SELECT question

2012-06-24 Thread Igor Tandetnik
Arbol One arbol...@gmail.com wrote: A pessimist is one who makes difficulties of his opportunities and an optimist is one who makes opportunities of his difficulties. Is there a question in there somewhere? -- Igor Tandetnik ___ sqlite-users mailing

[sqlite] C++ programming - getting data from a table

2012-06-24 Thread Arbol One
in a database called 'db' I created a table named 'friend' that looks like this: string create_table( CREATE TABLE friend (name TEXT, address TEXT, age INT)); I entered some values in that table and now I would like to extract the values from that table. Shown below is what I have done so far,

Re: [sqlite] C++ programming - getting data from a table

2012-06-24 Thread Simon Slavin
On 24 Jun 2012, at 3:40pm, Arbol One arbol...@gmail.com wrote: I entered some values in that table and now I would like to extract the values from that table. Shown below is what I have done so far, but I have hit a wall, I cannot find definitive information as to how to view the extracted

Re: [sqlite] C++ programming - getting data from a table

2012-06-24 Thread Arbol One
examples. TIA -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: Sunday, June 24, 2012 11:59 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] C++ programming - getting data from a table

Re: [sqlite] C++ programming - getting data from a table

2012-06-24 Thread Simon Slavin
On 24 Jun 2012, at 5:31pm, Arbol One arbol...@gmail.com wrote: Thank you for the prompt response. Now, using simple std::cout, could you show (give an example) of how to display (out streaming) the data extracted? Someone else perhaps. I don't use C++. Simon.

Re: [sqlite] C++ programming - getting data from a table

2012-06-24 Thread Igor Tandetnik
Arbol One arbol...@gmail.com wrote: Thank you for the prompt response. Now, using simple std::cout, could you show (give an example) of how to display (out streaming) the data extracted? sqlite3* db; sqlite3_open(db, db); sqlite_stmt* stmt; sqlite3_prepare_v2(db, select name, address, age from

Re: [sqlite] C++ programming - getting data from a table

2012-06-24 Thread Arbol One
@sqlite.org Subject: Re: [sqlite] C++ programming - getting data from a table Arbol One arbol...@gmail.com wrote: Thank you for the prompt response. Now, using simple std::cout, could you show (give an example) of how to display (out streaming) the data extracted? sqlite3* db; sqlite3_open(db

  1   2   3   4   5   >