<?php
//Code for connection on Arvixe
$myServer = "localhost\SQLEXPRESS";
$myUser = "Database User Name"; // replace with your values
$myPass = "Database Password"; // replace with your values
$myDB = "Database Name"; // replace with your values
//create an instance of the ADO connection object
$conn = new COM ("ADODB.Connection")
or die("Cannot start ADO");
//define connection string, specify database driver
$connStr = "PROVIDER=SQLOLEDB;SERVER=".$myServer.";UID=".$myUser.";PWD=".$myPass.";DATABASE=".$myDB;
$conn->open($connStr); //Open the connection to the database
?>
Support-Agent
Comments
amgadhavi
Abu Mozaffor Ali Ashfaque (BiploB)