11-03-2010 03:41 PM
Hi All,
The attached code works to call a stored procedure in SQL 2008 Express.
I wanted to create a Subvi of everything except the Database Open, because I only want to have it open once.
I placed a Conn ObjectReference.ctl on the front panel of the subvi and connected the connection reference from the DB Open to the subvi. It seems to like that well enough,
but I get a runtime error:
ADO Error 0x00000001
The file provided is not a datalink (UDL) or a file DSN.
Does anyone have any pointers?
Thanks,
Paul
11-03-2010 04:03 PM
Hi Paul,
try creating the subVI from the Edit->Create SubVI Menu (select the block diagram objects to be put into the SubVI first!)
If that fails too, please post a real source VI rather than a screenshot (you can also post snippets
)
Regards
(btw.: some pointers for you ... http://xkcd.com/138/ (hope you can laugh about it too) )
11-03-2010 04:19 PM
Yes, I can laugh about it ![]()
I did create the subvi as you suggested.
Here is a vi with the code that works and the call to the subvi which does not work, but of course it won't work at all unless you have a database named EDS_Test with a stored procedure called uspSensor_Log_Ins
As you can see, it looks like it is connected correctly, but the subvi stops with the error.
Regards,
Paul
11-03-2010 04:51 PM
I still cannot run the VIs since the owning library is missing (as reported by LV).
However, you also need to wire the reference control that you have inserted to the execute query VI - then the reference gets propagated.
If you have troubles to find the corresponding terminal (because it's far down the block diagram), double-click the control on the front panel window.
Regards
11-03-2010 05:13 PM
I got enough clues from your diagram to figure it out.
I didn't get the reference in the subvi put in correctly, It was like a new one and not a reference.
It works now.
Thanks a lot,
Paul