LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating an OLE object in the database

I have populated an Access database with data from my labview program.  It's fairly easy to do this using the INSERT VI, but now I need to be able to update values in the database.  While I figured out how to do this using the UPDATE query for common data types, I cannot figure out how to do this for binary/OLE data types.  For example, if I have a cluster of arrays, or an array of clusters, how would I update these in the database? 

Thanks!
0 Kudos
Message 1 of 23
(4,966 Views)
The easiest way is to tranform your cluster to a formatted string and then put it in your access code. See the attached example.
----------------------------------------------------------------------------------------------
There are 10 kind of persons. Those who understand binaries and the others.
0 Kudos
Message 2 of 23
(4,957 Views)
Thanks for the suggestion, but it's not quite what I am looking for.  I need a way of storing the actual cluster itself (as one field) in the database because it contains several arrays.  The structure of the database looks like this:

ForeignKey1   ForeignKey2   PrimaryKey   Parameter1(string)   Parameter2(Integer)   RawData(Cluster of arrays)

Now, when I use the INSERT statement, I can create a cluster of all of these values, so the RawData cluster gets flattened, converted to some "binary" format, and then inserted.  I've actually looked at the code for the INSERT statement to see how it does this conversion and tried to duplicate it, but I'm not very clear on the theory behind this so I have not been very successful.
0 Kudos
Message 3 of 23
(4,952 Views)
send me your code in 6.1 version in order to check it.
 
 
----------------------------------------------------------------------------------------------
There are 10 kind of persons. Those who understand binaries and the others.
0 Kudos
Message 4 of 23
(4,952 Views)
Attached is a labview VI outlining what I would like to do.  The first half (the insert statement) is easy to do.  It's the update part that I am having trouble with.  This VI is non-functional (the actual code and database I use are several megabytes in size, but can post if you want it). 

Thanks,
Brad
0 Kudos
Message 5 of 23
(4,947 Views)
Can you save the file in the version 6.1 of LabView?
----------------------------------------------------------------------------------------------
There are 10 kind of persons. Those who understand binaries and the others.
0 Kudos
Message 6 of 23
(4,945 Views)
Hello,

I don't know if it helps, but I converted that VI to 6.1 for anyone who wants to see it.

-Travis-
Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 7 of 23
(4,936 Views)
Thanks for making the conversion for me.  I was out of the office all day, so did not have a chance to get back until now.  Still working on this problem!

Brad
0 Kudos
Message 8 of 23
(4,932 Views)

Send us the code of the 3 other modules in order to see the vi.

 

 

----------------------------------------------------------------------------------------------
There are 10 kind of persons. Those who understand binaries and the others.
0 Kudos
Message 9 of 23
(4,929 Views)
I wish I could send you the codes for the other modules, but they are part of the Database Connectivity Toolset, and I don't think I'm authorized to release them without permission of NI.

Brad
0 Kudos
Message 10 of 23
(4,926 Views)