Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
mirek is currently offline  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? Smile

Mirek

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to use Sql * Update
Next Topic: Conditional jump or move depends on uninitialised value(s)
Goto Forum:
  


Current Time: Sat Jun 08 05:04:57 CEST 2024

Total time taken to generate the page: 0.02593 seconds