Sorry for not make it clear!
I am talking about statement handle not the database handle.
Can we use one statement handle for both insert and select?
Thanks,
JP




________________________________
From: Igor Tandetnik <[email protected]>
To: [email protected]
Sent: Monday, April 6, 2009 4:02:32 PM
Subject: Re: [sqlite] Database handle(sqlite3_stmt)

Joanne Pham <[email protected]> wrote:
> Is sqlite allowing to use the same datbase handle(sqlite3_stmt) for
> both read and insert operation.

Are you talking about database handle (sqlite3*) or statement handle 
(sqlite3_stmt*)? Your question is confusing.

Yes, you can issue both SELECT and INSERT statements over the same 
connection. Of course, each individual statement is either SELECT or 
INSERT (or UPDATE or DELETE and so on), it can't be both (though INSERT 
statements can involve sub-selects).

> Basislly onehandle(sqlite3_stmt) is inside the transaction which
> hasn't commited yet and the same handle is used for the read of the
> same database. Is this ok to use one handle for both operations(read
> and write).

Yes.

> For Sqlserver it didn't allow one handle for both read and
> write(insert)

It's been a long time since I last dealt with MS SQL Server, but I don't 
believe this statement is correct.

Igor Tandetnik



_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



      
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to