problem using sp from vb program

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Dan D. (DanD_at_discussions.microsoft.com)
Date: 07/09/04


Date: Fri, 9 Jul 2004 12:27:02 -0700

Using SS2000 and VB6. I'm getting this error when debugging the VB program: Parameter object is improperly defined. Inconsistent or incomplete information was provided.

Here's part of my VB code:
' check for duplicates
        ' Set up a command object for the stored procedure.
        Set cmdDup.ActiveConnection = conn1
        cmdDup.CommandText = "usp_CFIDup1"
        cmdDup.CommandType = adCmdStoredProc
        
        ' Set up an input parameter.
        Set param2 = cmdDup.CreateParameter("Input", adVarWChar, adParamInput)
        
        cmdDup.Parameters.Append param2
        param2.Value = rsCustomer!prop_mkey2
        
        ' Execute command, and loop through recordset, printing out rows.
        Set rsDup = cmdDup.Execute
The error happens when it tries to append param2

Here is the stored procedure:

CREATE PROCEDURE [dbo].[usp_CFIDup1]
        @inparm varchar
/*
        this procedure is used by the CFI program in
        \\Memphis\AM\Clients\Terminix\VESTA\requests\2315_CFIData\VBCode\CFIFreshData
        to check for duplicate records. it is one of several similar procedures
*/
AS
SET NOCOUNT ON

Select prop_mkey2 from tblCFICombined
                     WHERE quota is not null AND prop_mkey2 = @inparm
GO

Any ideas?

Thanks,

-- 
Dan D.


Relevant Pages

  • ADOCommand and grave accent problem
    ... The following causes an ADO exception: 'Parameter object is ... Inconsistent or incomplete information was provided' ... sCols:= 'testchar,testnumber,testdate'; ...
    (borland.public.delphi.database.ado)
  • delphi newbie
    ... I started to build the query with barcode and date and that worked fine ... When I tried to add time I get the error "parameter object is improperly ... inconsistent or incomplete information was provided" ...
    (alt.comp.lang.borland-delphi)
  • Re: SQL Help
    ... Parameter object is improperly defined. ... Inconsistent or incomplete ...
    (microsoft.public.inetserver.asp.db)