PC Review


Reply
Thread Tools Rate Thread

Call SQL stored procedure that inserts parameter value

 
 
sck10
Guest
Posts: n/a
 
      13th Nov 2008
Hello,

I am using the following that calls a SQL Server 2005 sproc to get a
recordset. My question is how do you call a stored procedure that inserts a
new record, but does not return any records?


Sub vbaInsertNewSecurityGroupADO1(groupName As String)
Dim cnnBsom As ADODB.Connection
Dim cmdBsom As ADODB.Command
Dim rsBsom As ADODB.Recordset

'Open a connection by referencing the ODBC driver.
Set cnnBsom = New ADODB.Connection
cnnBsom.ConnectionString = "DSN=cnnBsom;Trusted_Connection=Yes"
cnnBsom.Open
Set rsBsom = cnnBsom.Execute("EXECUTE xsvcrdiness.spcKnowledgeStore
'FindProductURL', '681'", adCmdStoredProc)
MsgBox rsBsom("strURL") & ": " & rsBsom("ProductURL_ID")
rsBsom.Close
cnnBsom.Close
Set cnnBsom = Nothing
End Sub















 
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
OleDb SqlDataSource stored procedure call parameter order mixed up ? User Microsoft ASP .NET 0 30th Sep 2010 05:20 AM
Call stored procedure with table parameter Jeremy Microsoft ADO .NET 2 6th May 2008 08:22 PM
Error: Executing Stored Procedures-- Cannot Pass TimeStamp Values From sqlCommand Object Parameter to A SQL Stored Procedure =?Utf-8?B?VGVjaE1E?= Microsoft ADO .NET 3 17th Mar 2004 04:03 AM
C#, Stored Procedure and Parameter Peter Microsoft ADO .NET 1 20th Dec 2003 12:47 PM
Call a stored procedure with decimal parameter Mona Microsoft ASP .NET 2 27th Jun 2003 02:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:08 PM.