Get 30% off your WordPress Hosting with code WPSAVE10. Launch Faster. Save More!
  • 00 Days
  • 00 Hours
  • 00 Minutes
  • 00 Seconds

How do I connect to my database via .NET? - SIRSTEVEHQ CP

A website built using .NET can be connected to databases of different types: MySQL, MSSQL, and Access databases. 

You need to use a specific connection string to connect to each database type:

MySQL

  • Driver={MySQL ODBC 5.3 Unicode Driver}; Server=(MySQL hostname); Port=; Option=0; Socket=; Stmt=; Database=(MySQL database name); Uid=(MySQL username); Pwd=(the password for the MySQL user);

MSSQL

A driver need not be specified when connecting to an SQL database:

  • Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;

Access Database

  • Driver={Microsoft Access Driver (*.mdb)};" & _ "DBQ=\\path_to_.mdb_file

As long as the placeholders in the above are replaced with your actual database connection details, it should allow a connection to the database.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I create a MySQL database in SIRSTEVEHQ CP?

You can create MySQL databases in seconds directly from your SIRSTEVEHQ CP. This option is...

How do I manage my Microsoft SQL database? - SIRSTEVEHQ CP

We recommend using SQL Server Management Studio (SSMS) for managing your Microsoft SQL databases....

How do I download or back up my MySQL Database? - SIRSTEVEHQ CP

There are various ways to export your MySQL databases for safe keeping or transfer. The first...

Can I set my database hostname as 'localhost'? - SIRSTEVEHQ CP

The answer to this question depends on the platform type that you are using at SIRSTEVEHQ!...

How do I check MySQL Database sizes across packages in SIRSTEVEHQ CP?

SIRSTEVEHQ provides an easy way to monitor and view all MySQL database sizes across all packages...