MARTINRODDY
Programmer
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
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