Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-05-09 : 09:48:47
|
baladitya writes "how to return the out put of a sql server stored procedure?how to pass the parameters from front_end(vb6),i am trying with ado command objectif possible please send the codethanq" |
|
YellowBug
Aged Yak Warrior
616 Posts |
Posted - 2002-05-09 : 10:18:39
|
Calls a stored procedure called up_CanIConnect.with two input parameters and one output parameter returned.Set cmUsers.ActiveConnection = cnSourcecmUsers.CommandType = adCmdStoredProccmUsers.CommandText = "up_CanIConnect"cmUsers.Parameters.Append cmUsers.CreateParameter("LicenceMode", adInteger, adParamInput, , intLicenceMode)cmUsers.Parameters.Append cmUsers.CreateParameter("Users", adInteger, adParamInput, , intUsers)cmUsers.Parameters.Append cmUsers.CreateParameter("Allow", adTinyInt, adParamOutput)cmUsers.ExecuteintAllow = cmUsers.Parameters("Allow").Value |
|
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2002-05-09 : 10:23:07
|
Here's the basic procedure:1. Create an ADO connection2. Create an ADO command for this connection. 3. For each of the parameters in the stored procedure (both input and output) create an ADO parameter. Append each parameter to the command.4. Execute the command5. Recurse through the command's parameters, reading out the new values. You can check out microsoft.com for more informationTim |
|
|
|
|
|