Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to update stored procedures when created through ADO objects?

Status
Not open for further replies.

apostolchopov

Programmer
Jun 8, 2004
53
BG
Hi!
I have the following problem. I use ADO connection object to connect to SQL server and ADO command object to execute commands on that server. In my program I undertake the following steps.

1. Connect to the SQL server
2. Create a database on the server by using the ADO connection obejct that I have created.
3. On this database I create a set of tables, indexes and stored procedures.
4. When I try to execute some of these stored procedures on the SQL server by using the ADO command object, I got an error saying that these procedures cannot be fould on the server.

Note: when I reconnect the result is the same. But when I restart my application, the stored procedures are found. Any clues?

Thanks in advance!

P.S. I could solve my problem by closing the ADO connection object and freeing it from the heap. Then create it again and connect to the server.
 
Thanks! I have at my disposal an ADO connection. How to get these collections from this ADO connection?
 
These are the collections within ADO programming model:

1\ Errors - contains all the Error objects created in response to a single provider-related failure;
2\ Fields - contains all the Field objects of a Recordset object;
3\ Parameters - contains all the Parameter objects of a Command object;
4\ Properties - a list of properties for several objects.

I do not see any way to get a collection of stored procedures for any database and refresh it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top