|
-
Jun 3rd, 2002, 11:06 PM
#1
Thread Starter
Member
Store Procedure Help !!!
Dear
I create a store procedure such as
CREATE PROCEDURE test @qty1 as float output
as
select @qty1 = sum(qty) from TestTable where TestNo = 'C01'
Visual Basic coding:
Private Sub Command1_Click()
dim Tqty as Double
Tqty=0
Myconn.Execute "Exec Test " & Tqty
Msgbox "Quantity = " & Tqty
End Sub
when i click command1 the result is 0.
Someone can tell me what wrong with my coding?
-
Jun 5th, 2002, 03:54 AM
#2
Because the Tqty is not being set anywhere...
Don't you have to pass variables as parameters for Sql Server?
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Jun 5th, 2002, 04:04 AM
#3
Because the Tqty is not being set anywhere...
Don't you have to pass variables as parameters for Sql Server?
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Jun 5th, 2002, 08:52 PM
#4
Thread Starter
Member
Dear hlynurj
Can you give me a sample of coding how to use Store Procedure?
I use SQL Server 2000 and Visual Basic 6.
And to open connection i use ADO.
-
Jun 6th, 2002, 01:59 AM
#5
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|