adodb.connection problems

G

Guest

Hello,
I am having a problem with ADODB connection class. This was all working fine until I restarted the pc with last known good configuration, which seems to have screwed things up

In the code below the conn.open command fails with a "cannot find stored procedure error". and system.runtime.interopservices.COMexception. The specified procedure could not be found. at ADODB.ConnectionClass.Open etc.. How can I fix this problem, do I need to re-install anything. I still have a reference to adodb

Regard

Robert

Dim Conn As ADODB.Connection = New ADODB.Connectio

GblConnectionString = "PROVIDER=SQLOLEDB.1;PASSWORD=" & txtPassword.Text & ";PERSIST SECURITY INFO=TRUE;USER ID=" & txtLoginName.Text & ";INITIAL CATALOG=Master" & ";DATA SOURCE=" & txtServerName.Tex

Tr
Conn.Open(GblConnectionString) '''*********** FAILS HERE*******************
Catch e As Exceptio
MsgBox(e.Message
MsgBox(e.ToString

End Tr
Dim rs As ADODB.Recordset = New ADODB.Recordse
Dim strRowSource As Strin

Tr
rs.Open("SELECT Name From sysdatabases WHERE Name NOT IN( 'master','tempdb','model','msdb','pubs','NorthWind')", Conn
Catch e As Exceptio
MsgBox(e.Message
MsgBox(e.ToString
MsgBox(e.Source
End Tr
 
R

Rami Saad

try to remove, and re-insert the reference to the stored procedure (assuming
you are using the server explorer)...And remove either the reference in the
server explorer, or in the code, if you are using both.....
This might help solve the problem.

--
Rami Saad
Microsoft GTSC Developer support for Middle East


Robert Batt said:
Hello,
I am having a problem with ADODB connection class. This was all
working fine until I restarted the pc with last known good configuration,
which seems to have screwed things up.
In the code below the conn.open command fails with a "cannot find stored
procedure error". and system.runtime.interopservices.COMexception. The
specified procedure could not be found. at ADODB.ConnectionClass.Open etc..
How can I fix this problem, do I need to re-install anything. I still have a
reference to adodb.
Regards

Robert

Dim Conn As ADODB.Connection = New ADODB.Connection

GblConnectionString = "PROVIDER=SQLOLEDB.1;PASSWORD=" &
txtPassword.Text & ";PERSIST SECURITY INFO=TRUE;USER ID=" &
txtLoginName.Text & ";INITIAL CATALOG=Master" & ";DATA SOURCE=" &
txtServerName.Text
Try
Conn.Open(GblConnectionString) '''*********** FAILS HERE********************
Catch e As Exception
MsgBox(e.Message)
MsgBox(e.ToString)

End Try
Dim rs As ADODB.Recordset = New ADODB.Recordset
Dim strRowSource As String

Try
rs.Open("SELECT Name From sysdatabases WHERE Name NOT IN(
'master','tempdb','model','msdb','pubs','NorthWind')", Conn)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top