Hi,
On the line
Set RS = Cmd.Execute
I get this error
Capture.GIF
Can anyone tell me what might be wrong..
Here is the full code -
![]()
Please Login or Register to view this content.
Hi,
On the line
Set RS = Cmd.Execute
I get this error
Capture.GIF
Can anyone tell me what might be wrong..
Here is the full code -
![]()
Please Login or Register to view this content.
Last edited by NeedForExcel; 09-11-2015 at 05:58 AM.
Cheers!
Deep Dave
This is almost certainly an issue with your SP, not VBA or ADO. See for example: http://stackoverflow.com/questions/2...begin-and-comm
Everyone who confuses correlation and causation ends up dead.
But If I copy values from the Parameters in Excel and Run it in the stored proc directly using SSMS, it works just fine..
Post the SQL you are using to Execute the SP in SSMS
Do you want the Stored Proc?
Not initially, I want to see how you're calling it in a way that works
Here is the piece of code that executes the SP
![]()
Please Login or Register to view this content.
I want to see how you are doing this in SSMS (forget VBA for now)
Something like:
![]()
Please Login or Register to view this content.
Oh Sorry..
I go to the Object Explorer > Find the stored Proc > Right Click On the SP Name > Input the Parameters > Execute
On issue which I found is,
Set RS = Cmd.Execute line should be Cmd.Execute.
As there is no recordset, the SP just affects certain rows, and there another Select statement that returns data..
The problem is the sproc. Again, please post the SQL that works in calling the sproc, calling it through the gui, generates sql in a new window, please post it
Even when I directly do it, it still runs.. (Shortened Version Of the XML)
EXEC DB_Common..SPName '<PType>VANILLA</PType><Solve>PREMIUM</Solve>', 'Bank1';
And what do you get if you execute that as a string? I.E
![]()
Please Login or Register to view this content.
Hi,
I found out the issue. It was my fault, the 2nd parameter was generating incorrectly..
I am extremely sorry for wasting your time..
Marking the thread as solved..
Glad you got it sorted![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks