私はこのプログラムを書きました:
con=kinterbasdb.create_database("create database 'D:/ThirdTask/test.db' user 'sysdba' password 'masterkey'")
conn=kinterbasdb.connect(host='localhost',database='D:/ThirdTask/test.db', user='sysdba', password='masterkey')
cur=con.cursor()
s="""
create table CLIENTS
(
ID FMTBCD PRIMARY KEY,
COMPANY CHAR(50),
LAST NAME CHAR(50),
FIRST NAME CHAR(50),
E-MAIL ADDRESS CHAR(50),
JOB TITLE CHAR(50),
BUSINESS PHONE CHAR(25),
HOME PHONE CHAR(25),
MOBILE PHONE CHAR(25),
FAX NUMBER CHAR(25),
ADDRESS MEMO,
CITY CHAR(50),
STATE/PROVINCE CHAR(50),
ZIP/POSTAL CODE CHAR(15),
COUNTRY/REGION CHAR(50),
WEB-SITE CHAR(25),
NOTES MEMO,
INCLUDING BLOB
)"""
print s
cur.execute(s)
con.close()
conn.close()
コンパイラは次のエラーを出します。
create table CLIENTS
(
ID FMTBCD PRIMARY KEY,
COMPANY CHAR(50),
LAST NAME CHAR(50),
FIRST NAME CHAR(50),
E-MAIL ADDRESS CHAR(50),
JOB TITLE CHAR(50),
BUSINESS PHONE CHAR(25),
HOME PHONE CHAR(25),
MOBILE PHONE CHAR(25),
FAX NUMBER CHAR(25),
ADDRESS MEMO,
CITY CHAR(50),
STATE/PROVINCE CHAR(50),
ZIP/POSTAL CODE CHAR(15),
COUNTRY/REGION CHAR(50),
WEB-SITE CHAR(25),
NOTES MEMO,
INCLUDING BLOB
)
Traceback (most recent call last):
File "D:\ThirdTask\connect.py", line 119, in <module>
cur.execute(s)
ProgrammingError: (-104, 'isc_dsql_prepare: \n Dynamic SQL Error\n SQL error code = -104\n Token unknown - line 6, column 16\n CHAR')
エラーの原因は何ですか?