Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Error creating tabe handleb
Fri, Jun 6 2008 12:38 AMPermanent Link

"John Postnikoff"
I have created a form to read some edit boxes and do some SQL statements.
When I execute the statement the first time it works. When I try to execute
the same again, or issue another SQL command I get "Error creating table
handle".  I then have to close the application. Any ideas or tips will be
appreciated.


John

Fri, Jun 6 2008 3:27 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John
Can you post your sql.

Roy Lambert [Team Elevate]
Tue, Jun 10 2008 1:17 AMPermanent Link

"John Postnikoff"
Hi Roy,

Here is my code and statement:

UpdateQuery.Active :=true;
UpdateQuery.SQL.Clear;
UpdateQuery.SQL.Add('Update orders set route = route
='+Quotedstr(edit1.text)+'where route ='+QuotedStr(edit2.text));
UpdateQuery.ExecSQL;
UpdateQuery.Active.false;
UpdateSource.Refresh;


John



"Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message
news:65DC8ED1-317B-45CE-93BC-5EEEC2DA3EF0@news.elevatesoft.com...
> John
> Can you post your sql.
>
> Roy Lambert [Team Elevate]
>

Tue, Jun 10 2008 3:34 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John


The SQL looks OK, but the UpdateQuery.Active lines baffle me. If this is cut'n'pasted then its wrong. Try this

UpdateQuery.Close;
UpdateQuery.SQL.Clear;
UpdateQuery.SQL.Add('Update orders set route = route
='+Quotedstr(edit1.text)+'where route ='+QuotedStr(edit2.text));
UpdateQuery.ExecSQL;
UpdateQuery.Close;
UpdateSource.Refresh;

Roy Lambert [Team Elevate]

Image