troubleshooting Question

call a stored procedure in VB6

Avatar of Pioneermfg
PioneermfgFlag for United States of America asked on
Visual Basic Classic
9 Comments1 Solution2334 ViewsLast Modified:
I have a stored procedure that returns (outputs) data.  I need the procedure to 1) accept input date from VB front end and 2) return the results into a flexgrid.  Here is the stored procedure:

CREATE PROCEDURE [DBO].[CHKREC] AS

DECLARE @VDD1 CHAR(1)
DECLARE @VDD0 CHAR(1)
SET @VDD0 = ''
SET @VDD1 = 'C'
SELECT
CASE WHEN SRCDOCTYP = '6' THEN '00' END AS RC,
CASE WHEN RECONUM = '0' THEN 'NOT CLEARED' END AS NOT_CLEARED,
CASE WHEN CHEKBKID like 'KEY BANK FLA' THEN ('00000'+'XXXXXXXXXX') END AS AcctNum,
RTRIM('000'+ CMTRXNUM) as CheckNum,
CONVERT(varchar(8),POSTEDDT,112)as IssueDate,
Right('0000000000' + Replace(Cast(TRXamnt as varchar), '.', ''), 10) AS AMOUNT,
CASE WHEN VOIDED = '1' THEN @VDD1  ELSE @VDD0 END AS VOIDED
FROM CM20200
WHERE SRCDOCTYP =6 AND CHEKBKID = 'KEY BANK FLA' AND POSTEDDT >= '08/25/05' and reconum = '0'  and CMTRXNUM LIKE '0%'
order by CMTRXNUM

GO

I just created this procedure (first time) and the syntax checks out.  How do I test to make sure the procedure works?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 9 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros