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 #19811 is a reply to message #19807] Fri, 23 January 2009 11:36 Go to previous message
mirek is currently offline  mirek
Messages: 14261
Registered: November 2005
Ultimate Member
Novo wrote on Thu, 22 January 2009 23:55

luzr wrote on Wed, 21 January 2009 08:14


OTOH, it is still supported. Note also that one nice way how to keep very frequent SQL statements precompiled on the server is to have them static:

void Test::remove_person(void)
{
    static Sql stmt("DELETE FROM person WHERE id = ?");


Mirek


Precompiled statements get invalidated after you execute a DDL-statement, if I recall that correctly. I think that managing of precompiled statements is more complicated than just declaring a statement static.



How so? That would mean invalidating secondary cursor, IMO, impossible.

Consider:

Sql sql1, sql2;
sql1 * Select(ID).From(DATA).Where(mycondition);
while(sql1.Fetch())
   sql2 * Update(DATA)(FIELD, value).Where(ID == sql1[ID]);


Any RDBMS worth of its name must support such loop. And if this loop works, I believe that declaring cursor static should work too (but I might be wrong, of course).

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: Wed Jun 25 12:00:58 CEST 2025

Total time taken to generate the page: 0.04454 seconds