On my local IIS everything is working, but when I change the connectionstring to remote database I get following error, although tables, storprocs etc. are equal on host (also tested using a sql datasource control):
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'MyStats.dbo.MuscleGroup'.
Source Error:
Line 66: public int GetMuscleGroups()
Line 67: {
Line 68: IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())));
Line 69: return ((int)(result.ReturnValue));
Line 70:
zipfeli
Member
110 Points
194 Posts
Linq not working after changing connectionstring to host database
Feb 12, 2008 09:26 PM|LINK
Dear
On my local IIS everything is working, but when I change the connectionstring to remote database I get following error, although tables, storprocs etc. are equal on host (also tested using a sql datasource control):
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'MyStats.dbo.MuscleGroup'.
Source Error:
Source File: c:\x\dataclasses1.designer.cs Line: 68
linq to sql
zipfeli
Member
110 Points
194 Posts
Re: Linq not working after changing connectionstring to host database
Feb 13, 2008 09:35 AM|LINK
Solved. I found some stored procedures had still the old database schema e.g. "mystats.dbo.musclegroup" instead of just "dbo.musclegroup".
I used the publish to host function>script to file of visual studio 2008, maybe its better to check all stored procedures after using that tool.