Can you provide me with some OleDB connection string examples?

DETAILS

MS Access (Jet)

"PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=[Path to database];User ID=Admin;Password=dbpassword"

Note

  1. You can use Server.Mappath function to identify Path to your database.  For example, if the DB file is in the /database directory under your web root, you would use server.mappath("/database/test.mdb").  As an alternative, you can also insert the full path.  You can find the path in the Account Information section in your control panel.
  2. You can omit the User Id & Password attributes, if your Access Database is not password protected.

MS SQL

"Provider=sqloledb;Data Source=[SQLServerName];Initial Catalog=[DatabaseName];User Id=[SQL Login];Password=[SQL Password]" 

Note

  1. For ASP.NET applications, you should consider using the .NET native SQL data provider rather than using Ole.
  2. You can find the SQL server information in the SQL Manager in your control panel.
  • 10 Users Found This Useful
Was this answer helpful?

Related Articles

What are the default document extensions?

DETAILSThe default document extensions in order of...

ASP.NET Support

All of our servers fully support the following versions of ASP.NET Asp.Net v1.1 Asp.Net...

I received HTTP 500 - Internal Server Error when I try to access my ASP or ASP.net page. What does this mean?

DETAILS "HTTP 500 - Internal Server Error" is one of the most uninformative error...

What is a Web Application?

DETAILS By default, your root directory is setup as an application root or application...