11-27-2015 03:43 PM
Hi All,
I am running Labview 13.0 on Windows 7 in Parallels on my mac. My database is a MySQL database on Amazon's RDS server. I am using windows ODBC to connect to it. I have been using LabSQL to manage the database needs of my program. I am getting the following error when I write a new item to my database:
Error 2146824584 occurred at Exception occurred in ADODB.Recordset: Operation is not allowed when the object is closed. Help Path is C:\Windows\HELP\ADO270.CHM and context 1240653 in ADO Recordset GetString.VI -> SQL Fetch Data (GetString).vi -> SQL Execute.vi -> MyVI.vi.
In general, here is my order of operations for the write:
Create com> Open Com > SQL Execute >Close Com. I only open and close the com one time in this program, so it's not being closed elsewhere.
I don't think anything is wrong with my connection line or command line since when I go in and check the DB, the item is there in its entirety. I could just take the guilty vi out of the error handling, but that seems like a poor "fix".
Please let me know if you need any further information. Any suggestions?
Thanks!
11-27-2015 04:07 PM
Please attach all the relevant VIs (if you have more than 2, bundle them into a ZIP file and attach that). If you are doing the operations (and only those operations) as you say you are, you shouldn't be getting the error message suggesting you're doing some SQL operation after the file is closed. But that seems to be your error message. Suggests that the code isn't necessarily acting the way you think/want it to, and I can't advise where the problem might be without seeing the code.
Bob Schor
11-27-2015 11:36 PM
11-28-2015 09:50 AM
I have made a small VI that gets the same error. The original VI relies on a MyRIO to run.
Thanks for your help!
11-28-2015 03:51 PM
The single VI that you included needs at least a half-dozen other VIs in order to make any sense. At the present, all we know is that you are using the Build Text Express VI to create what looks like a SQL command (INSERT INTO ...), and you appear to be executing 4 unspecified VIs using these data.
Try the following and report the results:
Bob Schor
P.S. -- LabSQL appears to be more than a decade old, certainly pre-dating "modern" LabVIEW (e.g. LabVIEW designed for Windows 7) and modern Windows (Windows 7 and above, and 64-bit Windows platforms). This, in itself, might present problems ...