Re: msdatashape provider error
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Tue, 23 Jan 2007 15:10:55 -0500
Thank you very much,Nothing to do with your problem, but why do you initialize cmdProcedure
When I only use 'Provider=MSDASQL.1' or 'Provider=SQLOLEDB.1' ,It's
ok.
If I use the MSDatashape as the provider and used original provider
as the data provider,It returned error.
sample code:
Test Function:
Private m_objConn As ADODB.Connection
Private Sub cmdExec_Click()
Dim cmdProcedure As ADODB.Command
Dim lngEffectedRows As Long
Set cmdProcedure = New ADODB.Command
Set cmdProcedure = ExcuteProcedure("dbo.usp_ProviderTest", 2,
lngEffectedRows)
only to discard the object that was created by assigning the result of
ExcuteProcedure to the variable?
<snip>
Public Function ExcuteProcedure(ByVal strProcedureName As String,
ParamArray ParamInputList()) As ADODB.Command
I'm not sure why this ever worked for you. You have two parameters, and
input and an output. But you only supply a single parameter value. IME,
unless a parameter's direction is adParamOutput or adParamReturnValue, I
have always received an error when failing to supply a value for it. The
thing is, there's been a bug with Parameters.Refresh for as long as I've
used it: it never sets a parameter to adParamOutput: always
adParamInputOutput. So you need to supply a value (even Null will work)
for that parameter. Give that a try and see.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
.
- References:
- Re: msdatashape provider error
- From: Bob Barrows [MVP]
- Re: msdatashape provider error
- From: wq352
- Re: msdatashape provider error
- Prev by Date: Re: msdatashape provider error
- Next by Date: Re: Using DetailView SqlDataSource How do I get the Key or Identity on
- Previous by thread: Re: msdatashape provider error
- Next by thread: Re: Microsoft Money
- Index(es):