LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

我用labsql连接labview与access数据库,但我想给表创建索引,创建索引的语句在access是可以的,但是labview却报错-2147217900。

创建索引语句:CREATE INDEX tag ON test(testdate) ,表名是test,字段是testdate。

报错:Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC Microsoft Access 驱动程序] CREATE INDEX 语句中的语法错误。

但是找不到语法错误呢。请帮下忙指点下

0 Kudos
Message 1 of 3
(4,213 Views)

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!

0 Kudos
Message 2 of 3
(4,206 Views)

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.

 

0 Kudos
Message 3 of 3
(4,200 Views)