Wednesday, March 21, 2012

Remote SQL WebHosting & Dreamweaver

Ok, so i am developing a site on Dreamweaver, and am looking to develop dynamic database communication.

How can i communicate with the database on this remote server? I have a custom connection string, but i dont know how to develop it locally.

Im self taught at this business, so im sorry if my posts are patronising to you expierienced guys.

Thank-You.

Hi Callum,

The connection string should have details of where the database can be found, what username / password are needed to get access etc. So if you're developing a local version then you'll need to have a connection string for your local version and one for your production environment.

Assuming you are developing on your local machine then an OLEDB connection should look something like this:

Provider=SQLOLEDB.1;
Persist Security Info=False;
Data Source=[serverName]; (127.0.0.1)
Initial Catalog=[databaseName];
User ID=[username];
Password=[password];

Though you would also need a version of that on your production environment. To keep things simple I would keep the same logon details, so you'd only need to change the Data Source

Then cloak your Connections directory in Dreamweaver so it doesn't try to upload your connection string overwriting your production string with your development string.

HTH

No comments:

Post a Comment