View Single Post
  #3 (permalink)  
Old February 23rd, 2007, 06:04 AM
hertendreef hertendreef is offline
Friend of Wrox
 
Join Date: Apr 2006
Location: , , .
Posts: 160
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, thanks for replying..
yes, i did.

Actually, my question is: can i assign the value of variable 'amount' to a Declare @var with the command "comd.Parameters.Add("@amount", SqlDbType.NVarChar, 10).Value = amount" or this is only for assigning a parameter within the 'Values' of the 'Insert' statement in the stored procedure?

If not, how to import 'amount' into the SP?

I guess i have also to make a loop in the code-behind for the parameters like this:

amount = 3 'example
comd.Parameters.Add("@amount", SqlDbType.Int).Value = amount
For i = 1 to amount
comd.Parameters.Add("@field1", SqlDbType.Int).Value = var1
Next


Reply With Quote