A
assassin
Unregistered / Unconfirmed
GUEST, unregistred user!
我有这样一个Query:
CREATE TABLE :TableName
(
SERIAL INTEGER NOT NULL,
CHAPTER SMALLINT,
SECTION SMALLINT,
EXTYPE SMALLINT,
DIFFICULTY SMALLINT,
EXTIME FLOAT,
TIMES INTEGER,
LASTTIME DATE,
QUESTION BLOB SUB_TYPE 0 SEGMENT SIZE 512,
ANSWER BLOB SUB_TYPE TEXT SEGMENT SIZE 16,
PRIMARY KEY (SERIAL)
)
我是这样使用TQuery:Query_all的:
//先设定Query_all.sql为上面的SQL语句
Query_all.ParamByName('TableName').asstring:=tablename;
Query_all.ExecSQL; //这个时候出现了错误
//报告SQl语句有误:说是第一行第18个字符 ? 无法识别
//我用SQL Monitor跟踪,形成的SQL居然是:
SQL Execute: INTERSOLV InterBase ODBC Driver - CREATE TABLE ?
(
SERIAL INTEGER NOT NULL,
...
...
//真搞不懂这个 ? 那里来的!
//是系统的BUG吗?
CREATE TABLE :TableName
(
SERIAL INTEGER NOT NULL,
CHAPTER SMALLINT,
SECTION SMALLINT,
EXTYPE SMALLINT,
DIFFICULTY SMALLINT,
EXTIME FLOAT,
TIMES INTEGER,
LASTTIME DATE,
QUESTION BLOB SUB_TYPE 0 SEGMENT SIZE 512,
ANSWER BLOB SUB_TYPE TEXT SEGMENT SIZE 16,
PRIMARY KEY (SERIAL)
)
我是这样使用TQuery:Query_all的:
//先设定Query_all.sql为上面的SQL语句
Query_all.ParamByName('TableName').asstring:=tablename;
Query_all.ExecSQL; //这个时候出现了错误
//报告SQl语句有误:说是第一行第18个字符 ? 无法识别
//我用SQL Monitor跟踪,形成的SQL居然是:
SQL Execute: INTERSOLV InterBase ODBC Driver - CREATE TABLE ?
(
SERIAL INTEGER NOT NULL,
...
...
//真搞不懂这个 ? 那里来的!
//是系统的BUG吗?