Category Database Connection Strings

  • Connecting to MSSQL in ASP.NET with a DSN

    This script demonstrates connecting to a MSSQL database in ASP.NET with a DSN. The script will make the connection and then output all the rows of a specified table.  // Set your connection string. // Replace id, pwd, database_name and mssqlX.easycgi.com with appropriate values Dim connString as string = "user id=id; password=pwd; initial catalog=database_name; data source=mssqlX.easycgi.com" Dim myConnection as New SqlConnection(connString)...

    Read more...
    1/5/2008 2:16:14 AM Category Database Connection Strings Comments 0
  • Connecting to MySQL in ASP.NET without a DSN

    The following scripts demonstrate creating connection to a MySQL database in .NET (C#) using the MySql.Data.MySqlClient Namespace. Pre-requisites: Contact our support team requesting a copy of the MySQL Connector NET DLL required for this connection. NOTE: This DLL must be provided by Easy CGI to prevent version mismatching Email support@easycgi.com to request the MySQL Connector Sample Script 1: The script will output...

    Read more...
    1/5/2008 2:15:01 AM Category Database Connection Strings Comments 0
  • Connecting to MS Access in ASP.NET without a DSN

    This script demonstrates connecting to an Access database in ASP.NET without a DSN. It is written in VB. The script will make the connection and then output all the rows in the specified table to an HTML table. Public Sub Page_Load(Source As Object, E As EventArgs) This function is called when the page loads. Dim ConnectionString As String ConnectionString = "Provider=Microsoft.Jet.OleDb.4.0;Data Source=" & dbpath &...

    Read more...
    1/5/2008 2:14:01 AM Category Database Connection Strings Comments 0
  • Connecting to MSSQL in Perl with a DSN

    This script demonstrates connecting to a MSSQL database in Perl with a DSN. The script will make the connection and then output all the rows of a specified table. Any lines beginning with a # are comments. use Win32::ODBC; This line tells the script to use the Win32::ODBC module, which is needed for the DSN connection. print "Content-type: text/html\n\n"; Sends a header so the page will be output as HTML. $dsnname...

    Read more...
    1/5/2008 2:13:09 AM Category Database Connection Strings Comments 0
  • Connecting to MSSQL in Perl without a DSN

    This script demonstrates connecting to a MSSQL database in Perl without a DSN. The script will make the connection and then output all the rows of a specified table. Any lines beginning with a # are comments. use Win32::ODBC; This line tells the script to use the Win32::ODBC module, which is needed for the database connection. print "Content-type: text/html\n\n"; Sends a header so the page will be output as HTML. ...

    Read more...
    1/5/2008 2:12:06 AM Category Database Connection Strings Comments 0
  • Connecting to MySQL in Perl with a DSN

    This script demonstrates connecting to a MySQL database in Perl with a DSN. The script will make the connection and then output all the rows of a specified table. Any lines beginning with a # are comments. use Win32::ODBC; This line tells the script to use the Win32::ODBC module, which is needed for the DSN connection. print "Content-type: text/html\n\n"; Sends a header so the page will be output as HTML. $dsnname...

    Read more...
    1/5/2008 2:10:54 AM Category Database Connection Strings Comments 0
  • Connecting to MySQL in Perl without a DSN

    This script demonstrates connecting to a MySQL database in Perl without a DSN. The script will make the connection and then output all the rows of a specified table. Any lines beginning with a # are comments. use Win32::ODBC; This line tells the script to use the Win32::ODBC module, which is needed for the database connection. print "Content-type: text/html "; Sends a header so the page will be output as HTML. ...

    Read more...
    1/5/2008 2:09:58 AM Category Database Connection Strings Comments 0
Archive