Re: msdatashape provider error



Thank you very much,
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)

Nothing to do with your problem, but why do you initialize cmdProcedure
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.


.