02-03-2009 09:30 PM
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...
02-04-2009 10:56 AM
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
02-04-2009 01:15 PM
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
02-04-2009 02:08 PM
02-04-2009 07:36 PM
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...
02-04-2009 07:37 PM
Thanks for the updates.
Mike...
02-05-2009 10:23 AM
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.
02-05-2009 09:01 PM
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...