Category Database Connection Strings

  • Connecting to MS Access in Perl with a DSN

    This script demonstrates connecting to a MS Access 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:08:54 AM Category Database Connection Strings Comments 0
  • Connecting to MS Access in Perl without a DSN

    This script demonstrates connecting to a MS Access 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:04:24 AM Category Database Connection Strings Comments 0
  • Connecting to MySQL in PHP with a DSN

    This script demonstrates connecting to a MySQL database in PHP 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. $dsnname = "testdsn"; Sets a variable to hold the name of the DSN to connect to. You should change this to your DSN name. $username = "testuser"; $password = "testpass"; These are the username/password...

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

    This script demonstrates connecting to a MySQL database in PHP 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. $hostname = "mysql1.easycgi.com"; Sets a variable to hold the address of the MySQL server. $database = "testdatabase"; Sets a variable to hold the name of the database. You should change this to the name...

    Read more...
    1/5/2008 2:00:31 AM Category Database Connection Strings Comments 0
  • Connecting to MS Access in PHP with a DSN

    This script demonstrates connecting to a MS Access database in PHP 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. $dsnname = "testdsn"; Sets a variable to hold the name of the DSN to connect to. You should change this to your DSN name. $username = "testuser"; $password = "testpass"; These are the username/password...

    Read more...
    1/5/2008 1:59:19 AM Category Database Connection Strings Comments 0
  • Connecting to MS Access in PHP without a DSN

    This script demonstrates connecting to a MS Access database in PHP 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. $db_location = "c:websitesyoursite22yoursite.comdb est.mdb"; Sets a variable to hold the physical path to the database. You should change this to the path for your database. $table = "testtable"; Sets...

    Read more...
    1/5/2008 1:55:41 AM Category Database Connection Strings Comments 0
  • Connecting to MSSQL in ASP with a DSN

    This script demonstrates connecting to a MSSQL database in ASP with a DSN. The script will make the connection and then output all the rows of a specified table.  Dim objConn, rsRecord, strSQL, tableName, dsnName, dsnUser, dsnPass, database Define the variables we will use in this script. Set objConn = Server.CreateObject("ADODB.Connection") Create the connection object. We will use ADO for the connection. dsnName...

    Read more...
    1/5/2008 1:53:07 AM Category Database Connection Strings Comments 0
Archive