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  |
 |
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
|
|
|
 |
|
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: Wed Jun 25 16:37:53 CEST 2025
Total time taken to generate the page: 0.05468 seconds
|