This project is read-only.

Trying to add MySQL to Orchard.Setup, help please...

Topics: Customizing Orchard, Installing Orchard
Jan 3, 2012 at 12:16 PM

I trying to add MySQL as database on the setup module Orchard.Setup and i have comming a bit now but in one step there is something that using sqlserver instead of my mysql provider.

I running the full source code but trying to only change in Orchard.Setup but when i running and debugging i finding that in the file ShellCOntainerFactory.cs line 47 there is a big function that runs and somewhere that i can not find calling the function DataModule.AttachToComponentRegistration in the file DataModule.cs and there its somehow has been changed from MySql provider to sql stuff that i can not find where its being set.

Do anyone has any idea where its calling the AttachToComponentRegistration function and where the sql stuff sets?

Becouse i getting this error message when i run the setup with MySQL:

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)
Please help, i hope someone that worked on the sql implemenation knows anything about this...

Jan 3, 2012 at 12:57 PM

That gets called automatically by Autofac (since it's a Module). You might be able to use [OrchardSuppressDependency(...)] to quash it ...

Jan 3, 2012 at 12:59 PM

randompete: I dont understand... what is Autofac?

Jan 3, 2012 at 1:29 PM


Autofac is the dependency injection framework Orchard uses.

You might want to familiarise yourself with and the rest of the developer documentation before attempting anything as difficult as replacing the database layer ...

Jan 3, 2012 at 1:31 PM

thanks taking a look but after taked a look at the module that alrady works for old versions of Orchard its didnt looked that difficult to fix it again but yea, its was not the easyest thing i has done.