Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Multiple Delete statements DBISAM -> ElevateDB
Tue, May 15 2007 7:39 PMPermanent Link

"Alan Questell"
I'm converting a DBISAM application to ElevateDB and I just ran into this.
Seems like it should be simple, but I can't see why it doesn't work.

This in DBISAM
 qryGen.SQL.Clear;
 qryGen.SQL.Add('DELETE FROM Courses;');
 qryGen.SQL.Add('DELETE FROM Students;');
 qryGen.SQL.Add('DELETE FROM Rolls');
 qryGen.ExecSQL;

doesn't work in ElevateDB...it complains that end of statement was expected
but DELETE was found so I assume that you can't separate statements with a
';'?

I've looked in the help file, but haven't found anything yet.

Tue, May 15 2007 7:48 PMPermanent Link

"Alan Questell"
I found this:
This property only accepts a single SQL statement in ElevateDB. DBISAM allow
for multi-statement scripts [for Query component].

Is there a good reason why this change was made; I used this all the time?

"Alan Questell" <alanq@pinehurst.net> wrote in message
news:D0BDF9DC-8FAC-41B0-8888-586F474DA310@news.elevatesoft.com...
> I'm converting a DBISAM application to ElevateDB and I just ran into this.
> Seems like it should be simple, but I can't see why it doesn't work.
>
> This in DBISAM
>  qryGen.SQL.Clear;
>  qryGen.SQL.Add('DELETE FROM Courses;');
>  qryGen.SQL.Add('DELETE FROM Students;');
>  qryGen.SQL.Add('DELETE FROM Rolls');
>  qryGen.ExecSQL;
>
> doesn't work in ElevateDB...it complains that end of statement was
> expected but DELETE was found so I assume that you can't separate
> statements with a ';'?
>
> I've looked in the help file, but haven't found anything yet.
>

Wed, May 16 2007 4:13 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Alan


>Is there a good reason why this change was made; I used this all the time?

The answer's quite simple. Tim ran out of semicolons before he released the beta and he's waiting for a new supply Smiley

For real, and in summary (to the best of my understanding), DBISAM simply fired off the statements one after the other Tim is thinking about making it "cleverer" and adding tests and loops in (many of us are just asking for scripts back). The alternative currently is either send the statements yourself or use a stored procedure.

There's quite a bit about it in the newsgroups.

Roy Lambert
Wed, May 16 2007 12:17 PMPermanent Link

"Alan Questell"
Yeah, I found it.

I'm just starting to switch over to EDB, so I haven't been keeping up with
it all. Other than that glitch, it's been fairly smooth. I replaced with
multiple dbengine.Execute('SQL Statement') lines.

I don't care for stored procedures at all so, yeah, I'm in with the crowd
that would like it back.

"Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message
news:99ADCEB7-4F09-4ADC-8D37-E045FE46F6B4@news.elevatesoft.com...
> Alan
>
>
>>Is there a good reason why this change was made; I used this all the time?
>
> The answer's quite simple. Tim ran out of semicolons before he released
> the beta and he's waiting for a new supply Smiley
>
> For real, and in summary (to the best of my understanding), DBISAM simply
> fired off the statements one after the other Tim is thinking about making
> it "cleverer" and adding tests and loops in (many of us are just asking
> for scripts back). The alternative currently is either send the statements
> yourself or use a stored procedure.
>
> There's quite a bit about it in the newsgroups.
>
> Roy Lambert

Image