PC Review


Reply
Thread Tools Rate Thread

Calling a Stored Procedure in a Stored Procedure Group

 
 
DJM
Guest
Posts: n/a
 
      21st Jan 2004
This function:
Public Function RunSP(ByVal SP As String, ByVal ReturnType As ReturnType,
Optional ByVal Params As Hashtable = Nothing) As ObjectDim oCmd As
SqlClient.SqlCommand = WarehouseDBCommand(SP)

Dim SqlParameter As SqlClient.SqlParameter

oCmd.CommandType = CommandType.StoredProcedure

SqlClient.SqlCommandBuilder.DeriveParameters(oCmd)

If Not Params Is Nothing Then

For Each SqlParameter In oCmd.Parameters

If Params.ContainsKey(SqlParameter.ParameterName) Then

If IsDBNull(Params.Item(SqlParameter.ParameterName)) Then

SqlParameter.Value = DBNull.Value

Else

SqlParameter.Value = Params.Item(SqlParameter.ParameterName).ToString

End If

End If

Next

End If

RunSP = RunAndReturn(oCmd, ReturnType)

oCmd.Connection.Close()

oCmd.Dispose() : oCmd = Nothing


 
Reply With Quote
 
 
 
 
DJM
Guest
Posts: n/a
 
      21st Jan 2004
Sorry about that; slipped.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
calling stored procedure using c++ =?Utf-8?B?Qm95ZA==?= Microsoft Dot NET 0 17th Aug 2007 01:44 AM
Help calling a stored procedure Mike Microsoft ADO .NET 5 12th Jun 2006 10:08 PM
calling stored procedure in ADO.NET 2.0 David Sagenaut Microsoft ASP .NET 1 24th Oct 2005 03:19 PM
calling a stored procedure in ADO.NET 2.0 David Sagenaut Microsoft C# .NET 1 24th Oct 2005 05:11 AM
Calling a SQL SP in a Stored Procedure Group DJM Microsoft ADO .NET 0 21st Jan 2004 07:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:24 PM.