LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use memo datatype in msaccess in the labview 7.1

dear all
i want to save 801 data values in one cell of the field of a ms access .but the option are OLE here i can't see the data values only long binary information is displayed & also while reading i can't read too.its giving invalid data type.
the orther option is memo which has a limitation of 64k character that would serve the purpose but  i want to know how to write to the database & then again read from the database
0 Kudos
Message 1 of 4
(3,257 Views)

Hi,

The recommended way to access MS Access or any database is to use the Database Connectivity Toolkit. The toolkit is recommended because it is fast and very easy to use.

If you don't have the Database Connectivity Toolkit, you can use ActiveX to access it by using Automation Open. This can be found by going to function palette >> Connectivity >> Automation Open. Once you have that on your block diagram, right click on it highlight select class, choose ActiveX, select browse. On the drop down menu, select either Microsoft ADO (ActiveX Data Object) or Microsoft DAO (Data Access Object). Both of them can be used to access the database. Once all that is set up, right click on the automation reference input and create a control.

There are examples that ship with LabVIEW called Retrieving Data from Access and Sending Data to Access. Both these examples use DDE and not ActiveX.

There is an example on this discussion forum that uses ActiveX to access the database.

I also found a number of other examples scattered through the discussion forums. I recommded that you search through them as well.

 
Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(3,205 Views)
hey i have been using the database connectivity tool only.but the memo type field is not there to select from.also when i am trying to write an array to the OLE datatype then i am not able to retrive the data.only it is showing in the database as long binary information .so please suggest me orther ways to store data in a field of the database.
0 Kudos
Message 3 of 4
(3,177 Views)

Hi,

There is a possibility that you are not writing the array to the database correctly. There are two ways to write arrays to databases. One is by flattening the array to a binary string and the other is by sending one data at a time through a loop. 

For reading the binary information, try using Database Variant To Data function

This discussion forum might also be helpful.

Good luck!

 
Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(3,161 Views)