Home » U++ Library support » U++ SQL » OleDB + parameters = problem
Re: OleDB + parameters = problem [message #19821 is a reply to message #19820] |
Sat, 24 January 2009 20:19 |
|
mirek
Messages: 13984 Registered: November 2005
|
Ultimate Member |
|
|
Novo wrote on Sat, 24 January 2009 11:58 |
luzr wrote on Fri, 23 January 2009 05:59 | Anyway, it seems like DDL does not have such bad effect on precompiled statements after all:
|
I checked my code.
In case of DDL statement and:
ADO - (I was using it with JET and MSSQL Server) I commit transaction and clear statement cache.
SQLITE - clear statement cache and finalize current statement (I'm using old API).
Interbase/Firebird - clear statement cache, rollback transaction, execute DDL, commit transaction. (This database has slightly different transaction model).
ODBC – rollback transaction, execute DDL, commit transaction. Cache is not affected. Probably, this is a bug, or it was tested only with MS SQL Server.
ORACLE - clear statement cache, execute DDL, mark all open statements as invalidated by DDL (they should be prepared again).
CTLIB (Sybase and MS SQL Server) – no problem with cache.
Microsoft has different APIs to work with MS SQL Server. Prepare-Bind-Execute model is implemented using special stored procedures, which are often called by a high-level API. You can check that in FreeTDS ODBC driver. It is open-source.
|
Well, sorry, my mistake, I have messed DDL with DML...
Maybe that why I have not ever encountered the problem in practice.
Seriously, do you often issue DDL during the application run?
IMO, in any multiuser environment, such thing is extremely unlikely because regular users do not have rights to do DDL.
OTOH, if I ever add automated prepared statement cache with SqlExp, "Invalidate" seems like a good idea, right?
Mirek
Mirek
|
|
|
|
|
OleDB + parameters = problem
By: Novo on Sat, 17 January 2009 18:16
|
|
|
Re: OleDB + parameters = problem
By: mirek on Mon, 19 January 2009 10:14
|
|
|
Re: OleDB + parameters = problem
By: Novo on Tue, 20 January 2009 23:34
|
|
|
Re: OleDB + parameters = problem
By: mirek on Wed, 21 January 2009 14:14
|
|
|
Re: OleDB + parameters = problem
By: mirek on Wed, 21 January 2009 14:22
|
|
|
Re: OleDB + parameters = problem
By: Novo on Fri, 23 January 2009 05:48
|
|
|
Re: OleDB + parameters = problem
By: Novo on Fri, 23 January 2009 06:03
|
|
|
Re: OleDB + parameters = problem
By: mirek on Fri, 23 January 2009 11:52
|
|
|
Re: OleDB + parameters = problem
By: mirek on Fri, 23 January 2009 11:59
|
|
|
Re: OleDB + parameters = problem
By: Novo on Sat, 24 January 2009 17:58
|
|
|
Re: OleDB + parameters = problem
By: mirek on Sat, 24 January 2009 20:19
|
|
|
Re: OleDB + parameters = problem
By: Novo on Sun, 25 January 2009 04:44
|
|
|
Re: OleDB + parameters = problem
By: Novo on Fri, 23 January 2009 05:55
|
|
|
Re: OleDB + parameters = problem
By: mirek on Fri, 23 January 2009 11:36
|
Goto Forum:
Current Time: Sat Jun 08 05:04:57 CEST 2024
Total time taken to generate the page: 0.02593 seconds
|