0
我有一个ADT,可以使用Advantage Data Architect进行修改。adsdb INSERT INTO
但我希望能够使用adsdb修改表。我已经创建了使用;
cnxn = adsdb.connect(DataSource='c:/Python27/', ServerType='1')
cursor = cnxn.cursor()
cursor.execute('CREATE TABLE Persons (PersonID INTEGER, LastName CHAR(100), FirstName CHAR(100))'
我能够插入数据到PersonsID字段使用;
cursor.execute('INSERT INTO Persons (PersonID) VALUES (01)')
但试图将数据插入char类型的列使用;
cursor.execute('INSERT INTO Persons (LastName) VALUES ("Smith")')
我得到错误;
adsdb.OperationalError: Error 7200: AQE Error: State = S0000; NativeError = 2121; [iAnywhere Solutions][Advantage SQL Engine]Column not found: Smith -- Location of error in the SQL statement is: 40
我试过在VALUE字段中使用单引号和没有引号,但我仍然出现错误。我已经提供了Google提供的错误代码,但是我找不到解决方案。
明智的答案谢谢你。谢谢你的提示,Persons表只是为了测试:) – apmacniven