Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL UPDATE PROBLEM

Status
Not open for further replies.

MARTINRODDY

Programmer
Apr 3, 2001
30
US
Hi I am trying to update a record in a table using SQL within Delphi using the similiar code to the following:

info_query.sql.clear;
info_query.sql.add('update INFOTABLE set name = :name');
info_query.sql.add('where DBTABLE = '''+'COMPTECH_INFO'+'''');
info_query.sql.add('and mach = '''+CurMachine+'''');
info_query.SQL.Add('and +'''+copy(recipe,colon_pos+1,4)+'''=''' + thickness +'''');
info_query.params[0].value := 'test';
info_query.ExecSQL;

But on execution I get the following system error
'Dataset not in Edit or Insert mode'

Has anybody any ideas ????
Thanks
Martin
 
What type of Query do you use? TQuery or TADOQuery?

You may have opened the connection on Readonly mode...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top