Sql1 := 'insert into b_stationcode(code,tationcode,auxi,name,sc_prim,date,sc_inputcode,sc_inputtime) values(''0019'',';Sql2 := ''''+code+''','''+auti+''','''+name+''',';Sql := Sql1 + Sql2 + '''0'',sysdate,''system'',sysdate)';
调试欢乐多
你的sql为了实现连接,用了字符串连接+,delphi中字符串用单引号,所以他把双引号括进去了。
执行的效果部分代码:
insert into b_stationcode ( ) values("0019","code实际值" )
Sql2的内容就是: '(code)','(auti)','(name)'
其中(code)表示 code变量的内容。
“我的字符串”,在SQL语句中,把这两个比引号改成两个单引号就成了
''我的字符串''
“我的字符串”,在SQL语句中,把这两个比引号改成两个单引号就成了
''我的字符串''