Linq not working after changing connectionstring to host database

Last post 02-13-2008 5:35 AM by zipfeli. 1 replies.

Sort Posts:

  • Linq not working after changing connectionstring to host database

    02-12-2008, 5:26 PM
    • Member
      54 point Member
    • zipfeli
    • Member since 08-07-2005, 12:07 PM
    • Posts 108

    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:

    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: 		

    Source File: c:\x\dataclasses1.designer.cs    Line: 68

    Filed under:
  • Re: Linq not working after changing connectionstring to host database

    02-13-2008, 5:35 AM
    Answer
    • Member
      54 point Member
    • zipfeli
    • Member since 08-07-2005, 12:07 PM
    • Posts 108

    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.

Page 1 of 1 (2 items)