我写了这个程序,却收到了意想不到的结果 我非常困惑
import firebirdsql
s1='''
create table CLIENTS
(
ID INTEGER NOT NULL,
COMPANY VARCHAR(50),
"LAST NAME" VARCHAR(50),
"FIRST NAME" VARCHAR(50),
"E-MAIL ADDRESS" VARCHAR(50),
"JOB TITLE" VARCHAR(50),
"BUSINESS PHONE" VARCHAR(25),
"HOME PHONE" VARCHAR(25),
"MOBILE PHONE" VARCHAR(25),
"FAX NUMBER" VARCHAR(25),
ADDRESS BLOB SUB_TYPE 1,
CITY VARCHAR(50),
"STATE/PROVINCE" VARCHAR(50),
"ZIP/POSTAL CODE" VARCHAR(15),
"COUNTRY/REGION" VARCHAR(50),
"WEB-SITE" VARCHAR(25),
NOTES BLOB SUB_TYPE 1,
INCLUDING BLOB,
CONSTRAINT PK_CLIENTS_ID PRIMARY KEY(ID)
);
'''
conn=firebirdsql.create_database(host='localhost', database='test1.fdb',
user='sysdba', password='masterkey')
cur=conn.cursor()
cur.execute(s1)
conn.commit()
conn.close()
因此,未创建数据库test1.fdb。 我还尝试使用一行数据库创建
conn = firebirdsql.connect(dsn='localhost/3050:/test1.fdb', user='sysdba',
password='masterkey'), but result is same.