OleDB connection string examples

OleDB connection string examples

MS Access (Jet)


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

Note:

  • Please use Server.Mappath function to identify Path to your database. For example, if the database file is in the /database directory under your webroot, please use server.mappath("/database/test.mdb"). You can also insert the full path as an alternative. You can find the path in the Site Info Manager section in your CP
  • If your Access Database is not password protected, please omit the User Id and Password attributes.

MS SQL


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

Note :

  •  Please consider using the .NET native SQL data provider rather than using Ole for ASP.NET applications.
  • The SQL server information can be found in the site tools section of CP.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

SQL server- network related or instance-specific error happened while connection establishing

  Instance-specific or network related error happening while connecting to SQL server   Please...

Do you allow custom COM components?

Do you allow custom COM components? We are not offering to install the custom COM components...

Error when accessing a WCF services

Error when accessing a WCF services Error when accessing a WCF service: "IIS specified...

How to cache static contents to client with UseMaxAge?

You can consider to caches static contents to the client with UseMaxAge if your website has too...

Dou you support Crystal Reports?

Yes, We do support Crystal Reports in all our Windows Servers.

Powered by WHMCompleteSolution