T TYZhang Unregistered / Unconfirmed GUEST, unregistred user! 2001-06-11 #2 DBGrid1.DataSource.DataSet.Refash 或者 DBGrid1.DataSource.DataSet.Close; DBGrid1.DataSource.DataSet.Open
DBGrid1.DataSource.DataSet.Refash 或者 DBGrid1.DataSource.DataSet.Close; DBGrid1.DataSource.DataSet.Open
E edwardzhao Unregistered / Unconfirmed GUEST, unregistred user! 2001-06-11 #4 不行不行,出错:"Project order_program.exe raised exception class EDBEngineError with message 'general SQL error. [Microsoft] [ODBC SQL Server Driver][SQl Server]Line 1 Incorrect syntax near ')'.'.
不行不行,出错:"Project order_program.exe raised exception class EDBEngineError with message 'general SQL error. [Microsoft] [ODBC SQL Server Driver][SQl Server]Line 1 Incorrect syntax near ')'.'.
D dxd0222 Unregistered / Unconfirmed GUEST, unregistred user! 2001-06-11 #5 query1.sql.add('insert into table_name...'); query1.ExecSQL; dbgrid1.datasource.refresh; 如果sql语句没写错的话,不应该有其他问题。
query1.sql.add('insert into table_name...'); query1.ExecSQL; dbgrid1.datasource.refresh; 如果sql语句没写错的话,不应该有其他问题。
T TYZhang Unregistered / Unconfirmed GUEST, unregistred user! 2001-06-11 #6 你是不是用DBGrid指向的Query来进行Insert,如果是,就要重写Query中的语句。
W wind_cloudy Unregistered / Unconfirmed GUEST, unregistred user! 2001-06-11 #7 你的dbgrid1与query.sql.add是不是用的同一个query?如果是, query.close; query.sql.clear; query.sql.add('select ... '); query.open;
你的dbgrid1与query.sql.add是不是用的同一个query?如果是, query.close; query.sql.clear; query.sql.add('select ... '); query.open;