On 4/20/05, liigo <[EMAIL PROTECTED]> wrote:
> I want to localize the error message of sqlite, such as:
>
> errcode=1: "No such table: xx"
>
> But where is the message in the source file?
Many of the error strings are in main.c.
I want to localize the error message of sqlite, such as:
errcode=1: "No such table: xx"
But where is the message in the source file?
Thanks, Will. I understand what you were trying to get at. Glad
to know I wasn't missing something when I couldn't figure out how
to do this from the sqlite3 shell. I guess I can learn the C API
and try that way
-P.
Christian Smith wrote:
On Mon, 18 Apr 2005, Cem Vedat ISIK wrote:
Having a lot of cross compiling trials and errors, I have decided not to
cross compile, but to compile the SQLite on Motorola PowerPC itself.
If this is still the config.h issue, I have made some changes to allow
compiling without
On 4/19/05, Peter Shenkin <[EMAIL PROTECTED]> wrote:
> In response to Will Leshner, could you tell me how to access this
> functionality from the sqlite3 shell? I'll then try it and
> respond. Thanks, -P.
Ah. Good point. You can't. Sorry about that. I was trying to think of
a way to determine wh
On Mon, 18 Apr 2005, Cem Vedat ISIK wrote:
>Having a lot of cross compiling trials and errors, I have decided not to
>cross compile, but to compile the SQLite on Motorola PowerPC itself.
If this is still the config.h issue, I have made some changes to allow
compiling without config.h being gener
Good suggestions, guys!
First, I modified the previously-posted test program to time the insertion rate
outside of the transaction (i.e. Kilnt's suggestion). I left the creation of
the table, however, outside of the timed insertion loop. In other words:
Create Table
Begin Timing
Begi
> 1) You have to loop through the resultset twice,
> once to put it in memory, the other to process
> it in your application.
Yes.
>
> 2) The sqlite3_prepare() and sqlite3_finalize()
> both should be in a loop as well right? Since
> they can throw SQLITE_BUSY and SQLITE_SCHEMA
> themselves. So
What did your code look like before you started storing results in
memory?
> -Original Message-
> From: Jay Sprenkle [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 20, 2005 10:06 AM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] Locking Methods
>
> I prepared the statemen
That's part of the problem I had been having...
1) You have to loop through the resultset twice,
once to put it in memory, the other to process
it in your application.
2) The sqlite3_prepare() and sqlite3_finalize()
both should be in a loop as well right? Since
they can throw SQLITE_BUSY and SQLIT
I prepared the statement and executed it.
Preparing doesn't use callbacks and prevents sql injection attacks.
I used a C++ class to store the query results in an STL container.
brief C/C++ pseudocode:
string sql = "select * from blah";
sqlite3_open();
sqlite3_prepare( sql );
bool Loop = true;
int
Frank,
You spotted the deliberate error! :)
The call is indeed:
const unsigned char *sw_cell(sw_result *result, int column, int row);
So the example should read:
printf("Data %s, %s, %s\n",
sw_cell(result, 0, 0),
sw_cell(result, 0, 1),
sw_cell(result, 0, 2));
Ben
F.
What APIs are you guys using to retrieve results and execute the
subsequent updates? Are you using prepare/step or sqlite3_exec with a
callback to retrieve the results? Would it be possible for you to post
more detailed pseudo-code? Conceptually I think we're all on the same
page; I think wh
I assume something is missing in your example.
There seems to be no connection between the 'result' variable and the
sw_cell() calls.
> result = sw_query(sqlite_handle, "SELECT * FROM table");
> printf("Data %s, %s, %s\n", sw_cell(0, 0), sw_cell(0, 1), sw_cell(0,
2));
best regards
Frank
Dear SQLite users,
I have put together a small wrapper function to illustrate a method of
completing a query which will not leave any lock on the database.
This takes the response of a query, eg, "SELECT * FROM table" and
returns a memory resident array containing the result. You may keep the
With the current design you have to save your query results to memory
then do your
updates from that list.
On 4/20/05, Ben Clewett <[EMAIL PROTECTED]> wrote:
> This is exactly my problem. My version is 3.1.6. The error is
> SQLITE_LOCKED.
>
> Ben
>
> Jay Sprenkle wrote:
> > I had the same trou
Hi,
Cem Vedat ISIK wrote:
Thank you very much for your reply, I'm using gcc but I think I have
nothing to do with a Mac, since the PowerPC I mention is not the
PowerPC of Macintosh. I'm working on a Motorola PowerPC.
Last time I checked, Motorola were one of the vendors delivering PowerPC
chips
Hi,
On Wednesday 20 April 2005 14:25, Harald Fernengel wrote:
> does anyone know how I can query an existing database schema to figure out
> whether a integer in a table is a "integer primary key" or just a plain
> "integer"?
...replying to myself...
The pragma table_info returns the info whethe
Try:
sqlite>.schema TableName
...will display table definition.
Best regards,
Witold
Hi,
does anyone know how I can query an existing database schema to figure out
whether a integer in a table is a "integer primary key" or just a plain
"integer"?
Thanks,
Harald
Steve Babineau wrote:
Hello all,
I'm having a problem here that seemed to work for SQLite < v3.
When I do have a query like:
SELECT
UPPER(col1)||
''
'||
col2||
'
'||
CASE
WHEN col3 IS NULL THEN ''19XX''
ELSE col3
END AS 'col3'||
'
'
FROM mytable;
I get an error:
near "||": syntax error.
I
This is exactly my problem. My version is 3.1.6. The error is
SQLITE_LOCKED.
Ben
Jay Sprenkle wrote:
I had the same trouble he did. Here's what I did that doesn't work:
select * from a into result;
foreach row in result
' this fails:
update b set col = a.value;
next
But base
22 matches
Mail list logo