Re: Problem with refreshing parameters in ADO
From: Val Mazur (group51a_at_hotmail.com)
Date: 06/24/04
- Next message: Val Mazur: "Re: DB Connection cannot be set by function"
- Previous message: Val Mazur: "Re: E_Fail Error"
- In reply to: Culture: "Problem with refreshing parameters in ADO"
- Next in thread: Malcolm Cook: "Re: Problem with refreshing parameters in ADO"
- Reply: Malcolm Cook: "Re: Problem with refreshing parameters in ADO"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 23 Jun 2004 22:03:56 -0400
Hi,
Using Refresh method to get a collection of the parameters is not a reliable
way anyway. Even MDAC says that Refresh will fail in some cases or it could
return incorrect information. It depends on a provider's capabilities. I
would suggest to avoid to use Refresh and define parameters explicitly.
-- Val Mazur Microsoft MVP "Culture" <limivorous@hotmail.com> wrote in message news:c6a64544.0406220844.bf8d19f@posting.google.com... > My code (running in access 2002) is: > > Private Sub GatherInfo_Click() > On Error GoTo Err_GatherInfo_Click > Const adCmdStoredProc = &H4 > Dim strConnect > Dim vDatabase > Dim vUsername > Dim vPassword > Set ObjConn = New ADODB.Connection > > vDatabase = "USER" > vUsername = "PASSWORD" > vPassword = "DB" > > strConnect = "Provider=MSDAORA;Data Source=" & vDatabase & ";User > ID=" & vUsername & ";Password=" & vPassword & ";" > ObjConn.Open strConnect > > Set StdProc = New ADODB.Command > > Set StdProc.ActiveConnection = ObjConn > > StdProc.CommandType = adCmdStoredProc > StdProc.CommandText = "P_INFO.RUNEXPORT" > StdProc.Parameters.Refresh > > ...... > End Sub > > The problem is, when it gets to StdProc.Parameters.Refresh it errors > with > "Unspecified error" > Whatever i do i can't seem to refresh the parameters.... > Could it also be to do with the references???? > > Thanks in advance :) > > Craig
- Next message: Val Mazur: "Re: DB Connection cannot be set by function"
- Previous message: Val Mazur: "Re: E_Fail Error"
- In reply to: Culture: "Problem with refreshing parameters in ADO"
- Next in thread: Malcolm Cook: "Re: Problem with refreshing parameters in ADO"
- Reply: Malcolm Cook: "Re: Problem with refreshing parameters in ADO"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|