LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DBPrepareSQL causes Automation Error

Here's my code:

db_h = DBConnect ("Provider= SQLOLEDB;Data Source=computer;Database=DB;User ID=xxx;Password=xxx");
resCode = DBSetAttributeDefault(db_h, ATTR_DB_COMMAND_TYPE,DB_COMMAND_STORED_PROC);
proc_h = DBPrepareSQL (db_h, "rd_createreport");

This causes return value -11, Automation error code -2147352573. Member not found.
0 Kudos
Message 1 of 4
(3,447 Views)
Hi Scott,

What version of SQL Toolkit are you using, and what OS? If you are in Win2000 or later, you should have SQL Toolkit 2.0.6 in order to use the latest ADO components. Otherwise, this question is a little vague. Can you provide more background about your application (i.e, OS, type of database, database contents, stored procedure functionality, what you attempting to do, etc.)? Thanks for your cooperation!

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 2 of 4
(3,447 Views)
2.0. So I guess I will shell out $1k for the upgrade. Will my 2.0 code work with 2.06?
0 Kudos
Message 3 of 4
(3,447 Views)
As far as I have seen and tested, the code should be fine. I have not noticed any change in the function calls. The only major difference is the version of the ADO, which is what the toolkit uses underneath. So, from a programming perspective, it should all look the same. It's what's under the hood that's different. You can also take a look at the Readme that will come with the toolkit to see where some of the differences are. Hope this helps!

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 4 of 4
(3,447 Views)