Version: 2.5 Final
Runtime Library Version: 2.5.08.0122
Template: Adapter
.NET Version: CF 2.0
Database: SQL Server 2000
I have an application running on Windows Mobile 6.
I am attempting to make a remote SQL Server connection.
I am not running on a native SQL CE database.
The application fails to make a database connection because it says that the connection string is invalid.
I am able to make a connection to the server if I manually set up a SqlConnection object.
But the LLBLGen connection fails.
Am I missing something or does the framework not support this?
string connectionString = "data source=sqlserver.remoteconnection.com;initial catalog=my_database;User ID=user_id;Password=password;persist security info=False;packet size=4096";
// ERROR OCCURS HERE.
DataAccessAdapter dataAccessAdapter = new DataAccessAdapter(
connectionString,
true
);
EntityCollection<CustomerEntity> customerEntityCollection = new EntityCollection<CustomerEntity>();
dataAccessAdapter.FetchEntityCollection(
customerEntityCollection,
null
);
foreach (CustomerEntity customerEntity in customerEntityCollection)
{
MessageBox.Show(customerEntity.CustomerId);
}
dataAccessAdapter.CloseConnection();
dataAccessAdapter.Dispose();
Error Message:
"Unknown connection option in connection string: initial catalog."
Stack Trace:
at System.Data.SqlServerCe.ConStringUtil.ParseStringIntoHashtable()
at System.Data.SqlServerCe.ConStringUtil.ParseConnectionString()
at System.Data.SqlServerCe.SqlCeConnection.set_ConnectionString()
at System.Data.SqlServerCe.SqlCeConnection..ctor()
at WM.BusinessObjects.DatabaseSpecific.DataAccessAdapter.CreateNewPhysicalConnection()
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.GetActiveConnection()
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.CreateSelectDQ()
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollectionInternal()
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollection()
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollection()
at WM.TimeTracker.MainForm.Setup()
at WM.TimeTracker.MainForm.MainForm_Load()
at System.Windows.Forms.Form.OnLoad()
at System.Windows.Forms.Form._SetVisibleNotify()
at System.Windows.Forms.Control.set_Visible()
at System.Windows.Forms.Application.Run()
at WM.TimeTracker.Program.Main()