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
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
[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
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
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
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.
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
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:
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.
...@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
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
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
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 |
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
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
: [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
16 matches
Mail list logo