SQL Connection

February 2, 2005 by Carl Shawn

I really enjoyed this tutorial and also wanted to use a SQL database.

I imported his Access database and then changed the connection string from:

string connectionstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data source="+ Server.MapPath("aspnet_calendar.mdb") +";";

to:

string connectionstring = "Driver={SQL Server}; provider="SQLOLEDB;" server="YOURSERVERNAME;" database="PDC;" uid="YOURUSERNAME;" pwd="YOURPASSWORD"";

Don't forget to give your user permissions to use the new database table. Replace the UPPERCASE items with your SQL server data.  Look at one of your other SQL connection strings for other databases you use in Dreamweaver.

Now I am off to try and adapt it to one of my current databases.

This is my first post to try and help out so I hope it helps!

Thanks,

Carl