LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating an OLE object in the database

How can I update two values at the same time?
Double ?? and What about 3 values?
http://www.vitst.com
Virry Test & Control
LabVIEW Certified Developer
0 Kudos
Message 11 of 23
(2,447 Views)
It looks like you'll have to execute a SQL statement to replace existing values in your database. This link describes a little more.
Jarrod S.
National Instruments
0 Kudos
Message 12 of 23
(2,436 Views)
I know a litte about the SQL Statement.
But When I want to update a binary info into the database I don't know how to use the SQL Statement to finish this job.
Thanks a lot

Qia
http://www.vitst.com
Virry Test & Control
LabVIEW Certified Developer
0 Kudos
Message 13 of 23
(2,424 Views)
Qia,

Are you trying to update values that already in the database or are you trying to just add data to your data values.  If you are trying to just add data values to your database then you should just use the functionality included in the Database connectivity toolkit (if you are using it).  As Jarrod mentioned if you are trying to update specific values in the database that already exist then you will have to use the SQL Statement that was linked.  If you have the correct syntax for your database this will execute any query.  Please repost with specifically what you are having trouble with if this does not help answer your question.

Have a great day!
Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 14 of 23
(2,404 Views)
Thank you for you reply,Andy F.

You can see my attachment.
http://www.vitst.com
Virry Test & Control
LabVIEW Certified Developer
0 Kudos
Message 15 of 23
(2,392 Views)
Error -2147217887 occurred at Cmd Execute.vi->TestLongBinaryFields2.vi

Possible reason(s):
Exception occured in Microsoft OLE DB Provider for ODBC Drivers, [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented . in Rec Create - Command.vi->Cmd Execute.vi->TestLongBinaryFields2.vi
http://www.vitst.com
Virry Test & Control
LabVIEW Certified Developer
0 Kudos
Message 16 of 23
(2,390 Views)
Qia,

I tried opening your file, but for some reason your ADOOpenDatabase.vi gives me a "Not a valid LabVIEW file" error.  In any case, I believe that your error message that you posted is much more helpful.  I was able to find this link about your error.  These errors are ActiveX and often are not very helpful unless you consult outside information.  From that link it looks link you might be trying to replace data with data that is longer.  You might try to rerun your code and insert and replace data that is a fixed size.  For example try inserting a numeric into your database and then replace it with another numeric.  Does this work?  If so you might need a method to standardize your image size so that you can replace something in your database.

Hope this helps!
Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 17 of 23
(2,358 Views)
Andy F.
Thank you for reply.
I attach my another examples, I go directly to use the ActiveX of LabSQL.
this time error is unable update, like this:

Exception occured in Microsoft JET Database Engine, Cannot update 'PictureSignture'; field not updateable.. in ADO Command Execute.vi->Test.vi

So I hope you can help.

Qia
http://www.vitst.com
Virry Test & Control
LabVIEW Certified Developer
0 Kudos
Message 18 of 23
(2,350 Views)
Qia,

Could it be possible that the permissions for your database are not correct to update that field?  I am not sure what would be causing this to happen.  Can you run any of the examples that come with LabSQL?  Can you execute any other commands to that database?  If you were to create another database and try to insert a value and then update it can you do this?  Try a numeric value or a string of a set length for this experiment.  Please let me know if you make any progress. 

Thanks!
Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 19 of 23
(2,340 Views)
Andy,
I work well with LabSQL's examples.
and I can execute other SQL Commands, and I can update the string value of database, but When I enconuter with the Binary or other data format like OLE Object, something goes wrong.
I've decide to store the Image and Long text's file link, then the link as string format would be acceptable in database easily. That's my alter way to solve my current problem. But I still want to solve it in database, because that's would be better security and integration.

Regards

Qia
http://www.vitst.com
Virry Test & Control
LabVIEW Certified Developer
0 Kudos
Message 20 of 23
(2,338 Views)