Maybe it would help to state my use case: without this functionality, what
is the proper way to copy a database using the C API without introducing a
race condition?
On 10/9/07, Robert Simpson <[EMAIL PROTECTED]> wrote:
>
> > -Original Message-
> > From: Cyrus Durgin [mailto:[EMAIL PROTECT
--- Cyrus Durgin <[EMAIL PROTECTED]> wrote:
> i'm wondering if there's a "standard" way to get an open file handle from an
> sqlite3 pointer using the C API. anyone know?
Patch below implements getting a file descriptor for a UNIX database
using the existing sqlite3 API function sqlite3_file_con
> -Original Message-
> From: Cyrus Durgin [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 09, 2007 5:02 PM
> To: sqlite-users@sqlite.org
> Subject: [sqlite] how to get file handle from sqlite3 object?
>
> i'm wondering if there's a "standard" way to get an open file
> handle from an
>
You would have not closed the database after usage,just check wheather you
have closed the database.
-Original Message-
From: varunkumar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 09, 2007 9:25 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] sqlite3_exec function error:database is l
--- Cyrus Durgin <[EMAIL PROTECTED]> wrote:
> i'm wondering if there's a "standard" way to get an open file handle from an
> sqlite3 pointer using the C API. anyone know?
No such function exists, but it would be a useful addition to the API.
Copying the database during an exclusive lock without s
Can you please clarify why this would be needed? Sqlite databases are
opened by name, thereby you can use standard OS or stdlib functions to
open the same file with a different handle.
Cyrus Durgin wrote:
i'm wondering if there's a "standard" way to get an open file handle from an
sqlite3 poi
Joe Wilson wrote:
--- Richard Klein <[EMAIL PROTECTED]> wrote:
I am seeing SQLite crashing during execution
of a SELECT statement when I make the page
cache very small (40 pages).
When I bump the cache up to 50 pages, the
problem goes away.
The problem only occurs on my RISC platform,
not on m
i'm wondering if there's a "standard" way to get an open file handle from an
sqlite3 pointer using the C API. anyone know?
--
Cyrus.
<[EMAIL PROTECTED]>
On Tue, 9 Oct 2007 07:06:48 -0700 (PDT), you wrote:
> Is there a way for SQLITE to automatically load user
> defined functions at database instantiation or upon
> database connection?
You can put a file .sqliterc in the users homedirectory with
commands for the command line tool. They will be ex
John,
Kind of defeats the point of "automatic".
Using a wrapper for application code is perfectly legitimate. However it does
not address the sqlite3 command line tool.
The ability to automatically load a library of functions via a dll would be a
really nice feature and could be used to pro
varunkumar wrote:
i am using sqlite3 database in our project
in my project one daemon process running , in this daemon process i am
opening the data base and inserts the data
in to sqlite3database using sqlite3_exec() API . for every one
minute i am opening the database and inserts th
i am using sqlite3 database in our project
in my project one daemon process running , in this daemon process i am
opening the data base and inserts the data
in to sqlite3database using sqlite3_exec() API . for every one
minute i am opening the database and inserts the values in to datab
[EMAIL PROTECTED] wrote:
sqlite3_open(dbname, &db);
sqlite3_prepare_v2(db, sql, -1, &pStat, 0);
while(sqlite3_step(pStat) == SQLITE_ROW)
{
row = (char *)sqlite3_column_text(pStat, 0);
my_array[i] = malloc( sizeof row * sizeof *my_array[i]);
memcpy (my_array[i], row, sizeof row * sizeof
The original example's an accident waiting to happen. You've hard
coded the results to 3 but, not limited the number of loops in the
while loop so, you could easily crash/corrupt the stack. You'll crash
if you have less than 3 results too. What happens if you only get one
result from the while lo
Ken wrote:
Is there a way for SQLITE to automatically load user defined functions at database instantiation or upon database connection?
Can it test for a .so/.dll and perform a call to load user functions? If the .dll does not exist maybe issue a warning?
Just a thought as a way to al
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: Hello,
I got an error when I try to read some data outside the while{}, inside the
while{} it's ok, an idea ?
test.db have just one "table1" and a "field1" with values "one", "two", "three".
#include
#include
int main(void)
{
sqlite3 *
Simon Davies a écrit :
On 09/10/2007, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hello,
I got an error when I try to read some data outside the while{}, inside the
while{} it's ok, an idea ?
test.db have just one "table1" and a "field1" with values "one", "two", "three".
.
.
.
const uns
You need to make a copy of the str instead of just capturing a pointer
reference.
try:
my_array[i] = strdup(sqlite3_column_text(pStat, 0));
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: Hello,
I got an error when I try to read some data outside the while{}, inside the
while{} it's ok,
[EMAIL PROTECTED] wrote:
Hello,
I got an error when I try to read some data outside the while{}, inside
the while{} it's ok, an idea ?
test.db have just one "table1" and a "field1" with values "one", "two",
"three".
#include
#include
int main(void)
{
sqlite3 *db;
sqlite3_stmt *pSta
Is there a way for SQLITE to automatically load user defined functions at
database instantiation or upon database connection?
Can it test for a .so/.dll and perform a call to load user functions? If
the .dll does not exist maybe issue a warning?
Just a thought as a way to allow users t
On 09/10/2007, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I got an error when I try to read some data outside the while{}, inside the
> while{} it's ok, an idea ?
> test.db have just one "table1" and a "field1" with values "one", "two",
> "three".
.
.
.
>const unsigned char *my
Hello,
I got an error when I try to read some data outside the while{}, inside the
while{} it's ok, an idea ?
test.db have just one "table1" and a "field1" with values "one", "two", "three".
#include
#include
int main(void)
{
sqlite3 *db;
sqlite3_stmt *pStat;
const char *dbname =
On Mon, 2007-10-08 at 02:03 -0700, chetana bhargav wrote:
> SQL Guru's,
>
> Want to know is there any easy way to make all the columns in a particular
> row to NULL other than specifying column name and NULL value, no delete as
> that would change the row-id
What happens if you do:
INSERT OR
23 matches
Mail list logo