Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

vb6 :problem executing stored procedure, incorrect parameter type for ADODB command object/?

Avatar of peter3244
peter3244Flag for United Kingdom of Great Britain and Northern Ireland asked on
Visual Basic ClassicVisual Basic.NET
7 Comments1 Solution457 ViewsLast Modified:
I'm trying to execute a SQL SERVER 2000 stored procedure from vb6.

I have two parameters that are causing a problem

1) Date time parameter
2)) a TEXT parameter

When excuting  I get a run time error. The problem appears to be the parameters themselves.

 The stored procedure and vb6 code examples is shown in code section.
stored procedure  is in SQL SERVER 2000

Basically could someone write the code for a vb6 to execute the following stored procedure (see code snippet).

Many thanks



The stored procedure is 
 
CREATE PROCEDURE InsertData
@guid      UNIQUEIDENTIFER,
@insertDate DATETIME,
@INSETTEXT TEXT
 
 
 
.Parameters.Append CreateParameter("@GUID", _
                                           DataTypeEnum.adguid?, _
                                           adParamInput)
    
 
    .Parameters.Append CreateParameter("@InsertDate", _
                                           DataTypeEnum.adDBDate?, _
                                           adParamInput)
 
        .Parameters.Append CreateParameter("@InsertText", _
                                                                       ??????, _
                                                                        adParamInput)
 
        .Parameters.Append CreateParameter("@Date_Saved", _
                                           DataTypeEnum.adDBDate, _
                                           adParamInput)
 
 
AS