Last week I installed Visual Studio Premium 2010, and today I had to open a SSIS 2008 package. To my dismay when I opened it I got the following error (Unable to instantiate XML DOM document, please verify that MSXML binaries are properly installed and registered) among others.
After a bit of Googling I found a post the suggested to re-install MSXML6 which I tried but it gave an error that a newer version is already Read More »
Really very useful! Copy, Paste, Execute and Use. Saved me a lot of time.
via Journey to SQL Authority with Pinal Dave
Today I started a new method and and instead of doing the usual copy and paste code from one of my already working methods I just typed it as it is only 3 lines.
SqlCommand Command = new SqlCommand("GetOrder");
DataTable dtOrder = Factories.ReturnDataObjetcs.FillDataTable(Command, _cn);
On Execution I got the following error:
Procedure or function 'GetOrder' expects parameter '@ID', which was not supplied.
So I check, rechecked and checked my code and stored procedure again and everything is correct. I called over my colleague to see if I’m missing something and he also couldn’t spot a problem. So we went about changing the name of the parameter, checking that its actually passing the parameter etc etc. We dropped the stored procedure, re-execute the code and got the expected error that it cant find the stored procedure called ‘GetOrder’. We recreated the procedure and tried again, and what do you know, we were still getting the error about not finding the parameter.
So we ended up checking the already working methods and it all boiled down to this one line
Command.CommandType = CommandType.StoredProcedure;
and hey presto!!! it finally worked.