Washington Community Group

Highlighted

SQLite Database Example.zip

Example code for using SQLite databases in LabVIEW.

(version 2 - added links to presentation)

(version 3 - added missing sqlAPI.xml)

-John
------------------------
Certified LabVIEW Architect
0 Kudos
Message 1 of 2
(2,651 Views)
1 REPLY 1
Highlighted

Re: SQLite Database Example.zip

Hello John

 

Downloaded your example, but was not able to run without error code:

 

Error 1172 occurred at Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.Data.SQLite.SQLiteException: SQL logic error or missing database
no such table: Session

Possible reason(s):

LabVIEW: (Hex 0x494) A .NET exception occurred in an external assembly. For information about correcting this error, copy the following exception (in bold), and search the Microsoft Developer Network (MSDN) Web site or the Web for a possible explanation.
System.Data.SQLite.SQLiteException in SQLite Database.lvclass:Execute Query.vi:3420001->SQLite File Data Access.lvclass:Execute Database API.vi->SQLite File Data Access.lvclass:New Test Session.vi:4240001->Write Example Database.vi->EXAMPLE - Write to SQLite Database.vi
Additional Info:

SQL STATEMENT:
insert or ignore into Session values (null, 'dut1234',strftime('%s','now'))

 

I had no "example.sqlite" database file....

 

Tried to rename another existing "*.sqlite" database assuming the example would add the needed tables, columns etc.

 

Can you supply me an example.sqlite file or better can the code be changed so that if file not found create new file....

 

Thanks in advance,

John

0 Kudos
Message 2 of 2
(67 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.