Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keyword Provider is not supported when trying to connect
Message
From
16/09/2008 03:20:32
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
VB 9.0
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01347746
Message ID:
01347828
Views:
32
Kevin,

The following happens:

In Employee.cs, the CreateDataAccessObject(string dataAccessClassName) is executed with parameter = 'dataaccessoledb' => OK
/// <summary>
/// Factory method that creates a data access object
/// </summary>
/// <returns>Reference to the data access object</returns>
protected override mmDataAccessBase CreateDataAccessObject(string dataAccessClassName)
{
	return new EmployeeDataAccess();
}
The dataAccessClassName parameter seems to be ignored and the EmployeeDataAccess is instantiated without taking into account the fact that an OleDB connection is wanted:


Then database commands are generated in EmployeeDataAccess and explicitely cast to System.Data.SqlClient commands :
 /// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.ParameterPrefixChar = "@";
this.DataAdapter = new System.Data.SqlClient.SqlDataAdapter();
//
// DataAdapter
//
this.DataAdapter.SelectCommand = (System.Data.SqlClient.SqlCommand)this.CreateSelectCommand();
this.DataAdapter.InsertCommand = (System.Data.SqlClient.SqlCommand)this.CreateInsertCommand();
this.DataAdapter.UpdateCommand = (System.Data.SqlClient.SqlCommand)this.CreateUpdateCommand();
this.DataAdapter.DeleteCommand = (System.Data.SqlClient.SqlCommand)this.CreateDeleteCommand();
}
Does this mean the MM Northwind sample is 'hardcoded' to use only MS Sql Server without demonstrating the ability to dynamically change from one data source to another ?


Kind regards,

Mark


>Mark,
>

>
>You're getting this error because it's using a Sql Server data access class (as seen in he stack trace) rather than an OLE DB data access class. I recomend overridding the CreateDataAccessObject() method in your project-level Factory class to see what's going on.
>
>Best Regards,
If everything seems to be going well, you obviously don't know what the hell is going on !
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform