LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Database connectivity toolkit delay prevents missing records?

Hmmm. I don't know what ot say. I have used this logic with SQL Server many times without problems. I always leave the Recordset Parameters at their default values.

 

I also don't understand why you are getting the error about not being able to update a recordset when all you're doing is trying to open it. At that point all you have tried to do is perform a query. You are running this against a table right? not a view?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 21 of 28
(1,255 Views)

Mike--

 

I found a minor bug in "parse field names from SELECT statement.vi" and took a crack at fixing it.  I have included it here for your consideration.  The bug occurs when there is a SQL statement with only one field, like "SELECT BLOB FROM BLOB_TABLE WHERE 1=0;"

 

Kevin

0 Kudos
Message 22 of 28
(1,238 Views)

Mike--

 

While debugging my code and reading the ActiveX docs, I discovered the Supported method which allows to discover whether a property is supported.  I added this to  "Create New Record in Recordset.vi" to add help for my problem.  See attached VI for your consideration.  I iterated on LockType and found again that Pessimistic worked.  I looked at my table in MS SQL Server Management Studio and there was data!  I wondered what had happened before to make me think that there was no data and discovered that, since I had used a query, I saw no data.  Apparently, if you run a query, the BLOBs don't show.  When you look at the table directly, the data shows.

 

Thanks for your help.

 

kc64

0 Kudos
Message 23 of 28
(1,230 Views)
Sorry--forgot attachement.
0 Kudos
Message 24 of 28
(1,227 Views)

Concerning your last comment, yes that is the case. Because blobs are potentially very large, the result from the query window doesn't show the blobs.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 25 of 28
(1,218 Views)

Thanks for the updates.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 26 of 28
(1,217 Views)

Mike stated earlier "Because LV's fundamental data structures are based on industry standards, this even works if you are wanting to read your data into something other than LV."

 

How might I unpack this data using a database client on the front end (something other than LV)?

 

Thanks.

0 Kudos
Message 27 of 28
(1,201 Views)

The best documentation of this is in the description that NI provides for LV's data structures when flattened to a string. As an example of the kinds of data structures LV uses, consider an array of double-precision floats. The first 4 bytes are a count of the number of values in the array. After that the first 8 bytes are the binary representation of the first element, second 8 bytes are the binary representation of the second element, and so forth. Other LV data structures have similarly easy-to-understand.

 

At a previous job it took one of our programmers about a day to write Java routines to read 1D and 2D arrays, and waveforms.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 28 of 28
(1,185 Views)