problem using sp from vb program
From: Dan D. (DanD_at_discussions.microsoft.com)
Date: 07/09/04
- Next message: Jonathan Blitz: "Puting password on Excel file created by DTS"
- Previous message: Joe Celko: "Re: subquery problem, wrong reference in the subquery?"
- Next in thread: oj: "Re: problem using sp from vb program"
- Reply: oj: "Re: problem using sp from vb program"
- Messages sorted by: [ date ] [ thread ]
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.
- Next message: Jonathan Blitz: "Puting password on Excel file created by DTS"
- Previous message: Joe Celko: "Re: subquery problem, wrong reference in the subquery?"
- Next in thread: oj: "Re: problem using sp from vb program"
- Reply: oj: "Re: problem using sp from vb program"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|