[thelist] Calling a sproc from VB

Tab Alleman Tab.Alleman at MetroGuide.com
Thu Feb 5 10:56:16 CST 2004

*sigh*  ok, there's still one last thing I am not getting.

If my sproc has this:

DECLARE @ReturnStr varchar(1000)
...do some stuff that doesn't return any recordsets...
RETURN @ReturnStr

And my VB App has this:

Dim sSprocReturn as String
...set up the command object (cmd)...
sSprocReturn = cmd.Execute

I'm getting a type mismatch error on the "sSprocReturn = cmd.Execute".
Why isn't the sproc returning a string?  What is it returning, and how
will I get the sproc's @ReturnStr into the VB App's sSprocReturn?

Sorry for being so dense, but all the stuff I've googled so far hasn't
included an example of exactly this scenario.

The contents of this email and any attachments are confidential.
It is intended for the named recipient(s) only.
If you have received this email in error please notify the system manager or  the 
sender immediately and do not disclose the contents to anyone or make copies.

** eSafe scanned this email for viruses, vandals and malicious content **

More information about the thelist mailing list