Sample OLE DB connection parameters for ASP.NET

Sample OLE DB connection parameters for ASP.NET

An OLE DB connection string combines all the information your ASP.NET application needs to connect to a database. Dreamweaver inserts this string in your page’s server-side scripts for later processing by your application server.

Dreamweaver provides you with string templates to create OLE DB connection strings for ASP.NET applications (see Creating an ASP.NET database connection in Dreamweaver). To create a connection string, you replace placeholders in the template with the requested parameter values. This section gives sample parameters for Microsoft Access and SQL Server databases.

Case 1: You have the .NET Framework on your local computer and you want to connect to a Microsoft Access database called sdSchool.mdb located in the following folder on your hard disk: c:\Inetpub\wwwroot\SkyDiveSchool\data\sdSchool.mdb. Here are the parameters to create this connection string:

Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=c:\Inetpub\wwwroot\SkyDiveSchool\data\sdSchool.mdb;

Case 2: You use the .NET Framework on a remote development server and you want to connect to a Microsoft Access database called mtnSchool.mdb located on the server in the following folder: d:\users\tara\projects\MtnDrivingSchool\data\mtnSchool.mdb. Here are the parameters to create the connection string:

Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=d:\users\tara\projects\MtnDrivingSchool\data\mtnSchool.mdb;

Case 3: You use the .NET Framework on a networked development server called Savant and you want to connect to a Microsoft SQL Server database called pubs on the server. Your SQL Server user name is "sa" and there is no password. If you use the Managed Data Provider for SQL Server (that is, if you chose SQL Connection in the Databases panel), here are the parameters to create the connection string:

Data Source=Savant;
Initial Catalog=pubs;
User ID=sa;
Password=;


Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly
 
ASPTreeView.com
 
Evaluation has ХШЅexpired.
Info...