Jay, you could still use the core datalayer code, just construct a SqlServerHelper (or MySqlHelper) (feed it with your own connection string which you can add to the web.config) and you've got the same functionality as the 'umbraco core' SqlHelper
Both SqlServerHelper and MySqlHelper are derived from the abstract SqlHelper which implements the ISqlHelper interface
I've done it in another project of mine and that worked flawlessly.
Custom sections - can they access a different database to the core Umbraco db?
Hi there,
I've had a look through the forum and can't find an answer to this but please don't shoot me if I didn't find the obvious.
The recent .tv videos and some blogposts got me thinking of an application using a custom section for admin and a user control for front end render.
The question is can the custom section access a separate database and if so, how?
tia
jay
Comment author was deleted
Sure Jay that's possible.
You just won't be able to use the datalayer (since that uses the default connectionstring)
So just add a new connection string and run your queries on that one.
cool, I thought that may be the case.
cheers Tim
Jay
Jay, you could still use the core datalayer code, just construct a SqlServerHelper (or MySqlHelper) (feed it with your own connection string which you can add to the web.config) and you've got the same functionality as the 'umbraco core' SqlHelper
Both SqlServerHelper and MySqlHelper are derived from the abstract SqlHelper which implements the ISqlHelper interface
I've done it in another project of mine and that worked flawlessly.
Cheers,
/Dirk
Hey Dirk,
Cool, even better. cheers
Jay
is working on a reply...