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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 dot net and sql server-2 quetion

Author  Topic 

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-08-13 : 18:27:34
1)when i call to a Stored Procedure
and for exampe i do :
myCommand.Parameters.Add("@flag", Data.SqlDbType.Int)
myCommand.Parameters("@flag").Value = DEAULT
how can i pass a DEFAULT value tothe stored procedure (in which the stored procedure for the specific variable uses its default defined value)?
2)how /what do i nedd to define and how do i get the returned vale,which i return from the Stored Procedure
thnaks in advance
peleg



Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)

nathans
Aged Yak Warrior

938 Posts

Posted - 2007-08-13 : 20:47:53
This article touches on both:

http://www.sqlservercentral.com/columnists/kKellenberger/usingparameterswithstoredprocedures.asp



Nathan Skerl
Go to Top of Page

ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2007-08-13 : 22:46:56
I believe if you don't set the parameter of set the parameter to NULL it will use the Default Value. If you use DBNull.value it will set the parameter equal to NULL.

Go to Top of Page
   

- Advertisement -