views:

254

answers:

2

I am trying to use Subsoinc 3.0.0.1 to connect to mysql db.

I added dll reference and connection string to app.config

Then I copied templates from ActiveRecord folder to folder in my solution and edited namespace and connection string but then i get this error:

Error 10 Running transformation: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.VisualStudio.TextTemplatingB345C0F834877921095C8F23912FC356.GeneratedTextTransformation.GetReader(String sql) at Microsoft.VisualStudio.TextTemplatingB345C0F834877921095C8F23912FC356.GeneratedTextTransformation.LoadTables() at Microsoft.VisualStudio.TextTemplatingB345C0F834877921095C8F23912FC356.GeneratedTextTransformation.TransformText() C:\Users\Hex\Documents\Visual Studio 2008\Projects\Ceger\Ceger.DAL\Models\Structs.tt 1 1

Then i found MySQL.ttinclude and Settings.ttinclude in TemplateProviders and replaced files form ActiveRecord with them but that didnt change everything.

I also tried with LinqTemplates.

A: 

Like the README says :) you need to use the MySQL.ttinclude in the TemplateProviders folder...

Rob Conery
RTFA :)"Then i found MySQL.ttinclude and Settings.ttinclude in TemplateProviders and replaced files from ActiveRecord with them but that didnt change everything."
A: 

Now i got it. I have to rename MySQL.ttinclude to SQLServer.ttinclude or to manualy change all reference in all files from SQLServer.ttinclude to MySQL.ttinclude.

and Settings.ttinclude in TemplateProveders folder is not needed. (it has been removed from 3.0.0.2)