Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with SQL connection in sample app
Message
From
23/06/2008 08:33:00
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 3.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01326050
Message ID:
01326084
Views:
11
Hi Patrick,

I am getting the same unhandled exception "Invalid Object Name message" in the sample app and I am using a known valid connection string. I am not so sure the connection string is your problem. I wonder if anybody else has been able to run the sample app right out of the box without changing anything except the connection string to something valid for them. All I have to do is add the password to it.

Tim

>I recently installed the new 6/13/2008 release of MM.NET. I changed the App.config files in both the Business object project and the windows forms project and copied the connection string straight from the properties of the Server Explorer | Data Connection in Visual Studio 2008.
>Whenever I try to run the sample app, I get a SQL client error. From the stack (below) it looks to me that there is a problem somewhere in that I am using a named instance of SQL Server. Please note that "Server" line near the top of the call stack shows two backslashes:
>
> Server="DIS-PMCDERMOTT2\\PMCDDEV"
>
>Here's my connection string from the App.config:
>"Data Source=DIS-PMCDERMOTT2\PMCDDEV;Initial Catalog=Northwind;Integrated Security=True" (Only one backslash)
>
>My suspicion is this is an issue with a missing escape character for C# somewhere that is not liking the backslash in a named instance SQL name.
>
>Anyone have any ideas how to fix this? I'm at a loss. TIA.
>Patrick
>
>
>System.Data.SqlClient.SqlException was unhandled
> Message="Invalid object name 'Message'."
> Source=".Net SqlClient Data Provider"
> ErrorCode=-2146232060
> Class=16
> LineNumber=1
> Number=208
> Procedure=""
> Server="DIS-PMCDERMOTT2\\PMCDDEV"
> State=1
> StackTrace:
> at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
> at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
> at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
> at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
> at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
> at System.Data.SqlClient.SqlDataReader.get_MetaData()
> at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
> at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
> at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
> at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
> at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
> at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
> at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
> at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
> at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
> at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
> at OakLeaf.MM.Main.Data.mmDataAccessSql.FillDataSet(DataSet ds, IDbDataAdapter dbAdapter, String tableName, Boolean clearOnFill)
> at OakLeaf.MM.Main.Data.mmDataAccessSql.FillDataSet(DataSet ds, IDbCommand command, String tableName, Boolean clearOnFill)
> at OakLeaf.MM.Main.Data.mmDataAccessSql.FillDataSet(DataSet ds, String command, String tableName, CommandType cmdType, IDbDataParameter[] dataParms, Boolean clearOnFill)
> at OakLeaf.MM.Main.Business.mmBusinessObject.FillDataTable(DataSet ds, String command, String tableName, String databaseKey, CommandType cmdType, IDbDataParameter[] cmdParams)
> at OakLeaf.MM.Main.Business.mmBusinessObject.FillDataSet(DataSet ds, String command, String tableName, String databaseKey, CommandType cmdType, IDbDataParameter[] cmdParams)
> at OakLeaf.MM.Main.Business.mmBusinessObject.GetDataSet(String command, String tableName, String databaseKey, CommandType cmdType, IDbDataParameter[] dataParams)
> at OakLeaf.MM.Main.Business.mmBusinessObject.GetDataSet(String command, String tableName, String databaseKey, IDbDataParameter[] dataParams)
> at OakLeaf.MM.Main.Business.mmBusinessObject.GetDataSet(String command, String tableName, IDbDataParameter[] dataParams)
> at OakLeaf.MM.Main.Globalization.mmMessageManager.GetAllMessages(Object languagePK)
> at OakLeaf.MM.Main.Globalization.mmMessageManager.GetMessageCache(Object LanguagePk, Boolean ForceReload)
> at OakLeaf.MM.Main.Globalization.mmMessageManager.GetMessageCache(Object LanguagePk)
> at OakLeaf.MM.Main.Globalization.mmMessageManager.GetMessage(String messageKey, Object languagePK, Boolean returnMessageKeyIfNotFound)
> at OakLeaf.MM.Main.Globalization.mmMessageManager.GetMessage(String messageKey, Object languagePK)
> at OakLeaf.MM.Main.Windows.Forms.mmBaseForm.LocalizeText(Object languagePK)
> at OakLeaf.MM.Main.Windows.Forms.mmBusinessBaseForm.LocalizeText(Object languagePK)
> at OakLeaf.MM.Main.Windows.Forms.mmBaseForm.set_Text(String value)
> at OakLeaf.MM.Main.Windows.Forms.mmBaseForm.InitializeComponent()
> at OakLeaf.MM.Main.Windows.Forms.mmBaseForm..ctor()
> at OakLeaf.MM.Main.Windows.Forms.ILBaseForm..ctor()
> at OakLeaf.MM.Main.Windows.Forms.mmBusinessBaseForm..ctor()
> at OakLeaf.MM.Main.Windows.Forms.mmEntityBusinessForm..ctor()
> at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm..ctor()
> at OakLeaf.MM.Main.Windows.Forms.mmExceptionForm..ctor(String exception, String stackTrace)
> at OakLeaf.MM.NorthwindSample.Main.AppMainEntry.Main() in C:\Program Files\Mere Mortals .NET Framework 2008\Samples\MM Northwind Sample Application_CSharp\Main.cs:line 88
> InnerException:
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform