query1.Close;
query1.DatabaseName:='c:\windows\desktop';
query1.sql.values['select * from "books.db"'];
query1.SQL.Clear;
str1:='insert into books (书号) values (';
str2:=edit3.text;
str3:='''';
str4:='''';
query1.SQL.add(str1+str3+str2+str4);
query1.ExecSQL;
哪儿有错误请帮帮忙。
DEPHI上显示如下:
Project Project2.exe raised exception cllass EDBEngineError with
message'Unexpected end of command.
Token:'200311110'
Line Number:1'.Process stopped.Use Step or Run to continue.
query1.DatabaseName:='c:\windows\desktop';
query1.sql.values['select * from "books.db"'];
query1.SQL.Clear;
str1:='insert into books (书号) values (';
str2:=edit3.text;
str3:='''';
str4:='''';
query1.SQL.add(str1+str3+str2+str4);
query1.ExecSQL;
哪儿有错误请帮帮忙。
DEPHI上显示如下:
Project Project2.exe raised exception cllass EDBEngineError with
message'Unexpected end of command.
Token:'200311110'
Line Number:1'.Process stopped.Use Step or Run to continue.
就成了,1000分别忘了给啊!!
:)
成什么了,sql写错了,引号也表错了
把他放到硬盘的跟目录下,如:c:\xxx.mdb
query1.Close;
query1.DatabaseName:='c:\windows\desktop';
query1.sql.values['select * from "books.db"'];
query1.open;
query1.close;
query1.SQL.Clear;
str1:='insert into books (书号) values (';
str2:=edit3.text;
str3:='''';
str4:=''''+')';
query1.SQL.add(str1+str3+str2+str4);
query1.ExecSQL;
调试通过