02-28-2012 05:22 AM
创建索引语句:CREATE INDEX tag ON test(testdate) ,表名是test,字段是testdate。
报错:Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC Microsoft Access 驱动程序] CREATE INDEX 语句中的语法错误。
但是找不到语法错误呢。请帮下忙指点下
02-28-2012 05:36 AM
I connect labVIEW with access using labsql, and now I want to create an index for a table,but after running ,labVIEW shows the mistake:-2147217900.
the sentence for creating index:CREATE INDEX tag ON test(testdate) ,table name is 'test',field name is 'testdate'.
mistake:Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC Microsoft Access drivers] CREATE INDEX Statement has grammar mistakes.
But I can't find where the mistakes are.Please help me.Thanks!
02-28-2012 08:41 AM - edited 02-28-2012 08:46 AM
Your syntax may be OK. The error code might also indicate that you have used a reserved word in your statement.
This link may help you find solve your syntax error:
http://www.adopenstatic.com/faq/80040e14.asp
You may also have a duplicate value between records in the database. Each 'testdate' would need to be unique or it can't be used as an index.