This months MSDN article (April 200 8) is very interesting. The article is on page 99, titled “Test Run Testing SQL Stored Procedures Using LINQ,” by Dr. James Mccaffrey. It peaked my interest because I’ve been looking for a sample test harness for LINQ and stored procedures.
I downloaded the sample code at msdn2.microsoft.com/magazine/cc13511. Installed it on my Visual Studio 2008 Pro and tried to run it out of the box. Well, it did not run. It could not connect to the database. So, I looked for the sql script somewhere in the installed files and found it. I was also missing the SQL Server Management Studio Express, so I had to install it to run the sql script. After running the sql script the test run code still does not run because it could not connect to the database. So, I manually connect the database through Visual Studio. It still would not connect. I discovered that my manual connection string is not the same as the code so I went ahead and replace it:
string connString = “server=.\\SQLEXPRESS;Initial Catalog=dbMovies;Integrated Security=True”;
Well, the code runs as expected after replacing the connection string. So, I just want to put this blog post out there for other folks that are going to blaze the same path to save them some time. I also sent a note to the author.
Regards,
Bennett
Tags:
Share
You need to be a member of Job Connections to add comments!
Join this Ning Network