> Is it possible to check even if a db file exists and if necessary create it
> from within c++ ?
> So I would open the db file sqlite3_open("ah.db", &db); only if it really
> exists ..
Why do you need to create file from C++? If file doesn't exist SQLite
will automatically create it for you af
On 26 Jun 2012, at 5:27pm, deltagam...@gmx.net wrote:
> Is it possible to check even if a db file exists and if necessary create it
> from within c++ ?
> So I would open the db file sqlite3_open("ah.db", &db); only if it really
> exists ..
Look at the flags available to the _open_v2() funct
Am 26.06.2012 18:00, schrieb Pavel Ivanov:
On Tue, Jun 26, 2012 at 11:50 AM, deltagam...@gmx.net
wrote:
Am 26.06.2012 17:08, schrieb Pavel Ivanov:
You are leaking stmt statement (re-preparing without finaliznig) and
your call to sqlite3_close returns SQLITE_ERROR because of that, but
you don'
On Tue, Jun 26, 2012 at 11:50 AM, deltagam...@gmx.net
wrote:
> Am 26.06.2012 17:08, schrieb Pavel Ivanov:
>
>> You are leaking stmt statement (re-preparing without finaliznig) and
>> your call to sqlite3_close returns SQLITE_ERROR because of that, but
>> you don't even check that so you are leakin
On Tue, Jun 26, 2012 at 11:50 AM, deltagam...@gmx.net
wrote:
> Am 26.06.2012 17:08, schrieb Pavel Ivanov: // select count(*) from
> eventlog
> sqltotal = "Select count(*) from eventlog";
>rc = sqlite3_prepare(db, sqltotal, strlen(sqltotal), &stmt, NULL);
>rc = sqlite3_step(stmt);
>
Am 26.06.2012 17:08, schrieb Pavel Ivanov:
You are leaking stmt statement (re-preparing without finaliznig) and
your call to sqlite3_close returns SQLITE_ERROR because of that, but
you don't even check that so you are leaking database connections as
well.
Pavel
On Tue, Jun 26, 2012 at 11:01 AM
On Tue, Jun 26, 2012 at 11:15 AM, Simon Slavin wrote:
>
> On 26 Jun 2012, at 4:11pm, "Black, Michael (IS)"
> wrote:
>
> > So...transaction is started at sqlite3_step and stays open until
> sqlite3_reset or sqlite3_finalize, right?
> >
> > sqlite3_close would do what if you didn't finalize? Just
ion Systems
> >
> > ________
> > From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org]
> > on behalf of Richard Hipp [d...@sqlite.org]
> > Sent: Tuesday, June 26, 2012 9:49 AM
> > To: General Discussion of SQLite Databas
On Tue, Jun 26, 2012 at 11:08 AM, Pavel Ivanov wrote:
> You are leaking stmt statement (re-preparing without finaliznig) and
> your call to sqlite3_close returns SQLITE_ERROR because of that, but
> you don't even check that so you are leaking database connections as
> well.
>
Good eye, Pavel! N
On 26 Jun 2012, at 4:11pm, "Black, Michael (IS)" wrote:
> So...transaction is started at sqlite3_step and stays open until
> sqlite3_reset or sqlite3_finalize, right?
>
> sqlite3_close would do what if you didn't finalize? Just a memory leak or
> worse? Or would sqlite3_close return an erro
26, 2012 9:54 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] access from 2 different programms to same sqlite3-db
On Tue, Jun 26, 2012 at 10:51 AM, Black, Michael (IS) <
michael.bla...@ngc.com> wrote:
> Does that mean the "prepare" is wrapped inside a tra
You are leaking stmt statement (re-preparing without finaliznig) and
your call to sqlite3_close returns SQLITE_ERROR because of that, but
you don't even check that so you are leaking database connections as
well.
Pavel
On Tue, Jun 26, 2012 at 11:01 AM, deltagam...@gmx.net
wrote:
> Am 26.06.2012
On Tue, Jun 26, 2012 at 11:01 AM, deltagam...@gmx.net
wrote:
> Am 26.06.2012 16:49, schrieb Richard Hipp:
>
> On Tue, Jun 26, 2012 at 10:46 AM, deltagam...@gmx.net
>> wrote:
>>
>> I have a c++ GUI application from where the db is read and the content is
>>> displayed in a Clistbox.
>>> Then I tr
Am 26.06.2012 16:49, schrieb Richard Hipp:
On Tue, Jun 26, 2012 at 10:46 AM, deltagam...@gmx.net
wrote:
I have a c++ GUI application from where the db is read and the content is
displayed in a Clistbox.
Then I try to delete some rows from the sqlite3-db from the console.
After rereading from wi
nformation Systems
>
>
> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org]
> on behalf of Richard Hipp [d...@sqlite.org]
> Sent: Tuesday, June 26, 2012 9:49 AM
> To: General Discussion of SQLite Database
> Subject: EXT :Re: [sq
om: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on
behalf of Richard Hipp [d...@sqlite.org]
Sent: Tuesday, June 26, 2012 9:49 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] access from 2 different programms to same sqlite3-db
On Tue, Jun 26, 2012 a
On Tue, Jun 26, 2012 at 10:46 AM, deltagam...@gmx.net
wrote:
> I have a c++ GUI application from where the db is read and the content is
> displayed in a Clistbox.
> Then I try to delete some rows from the sqlite3-db from the console.
> After rereading from within the GUI the deleted rows are stil
17 matches
Mail list logo