Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to run a sql stored procedure from VBA but getting error.
Error is run-time error '-2147467259 (80004005)' and 2nd line 2013-06-20. I have tried all variations found on google but getting same error. Here is my code. =============== Sub Run_SP() Dim cmd As ADODB.Command Set con = New ADODB.Connection con.Open "Provider=SQLOLEDB;Password=anish;User ID=anish;Initial Catalog=cpcom;Data Source=bhw1;Extended Properties=Trusted_Connection=no;" Set cmd = New ADODB.Command With cmd ..ActiveConnection = con ..CommandText = "exec cpsrmail" ..CommandType = adCmdText ..Execute End With con.Close Set cmd = Nothing Set con = Nothing End Sub ================ Regards, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run a Stored Procedure from Excel | Excel Programming | |||
Accessing a Stored Procedure | Excel Programming | |||
Executing Stored Procedure | Excel Programming | |||
execute stored procedure | Excel Programming | |||
Execute stored procedure using DAO | Excel Programming |