i am using mysql project and I would like to connect the external database of MS SQL Server 2005
I wrote the commans as -
$conn2 = ew_Connect("host2", "user2", "pass2", "db2");
I got an error "Warning: Creating default object from empty value in"
i am using mysql project and I would like to connect the external database of MS SQL Server 2005
I wrote the commans as -
$conn2 = ew_Connect("host2", "user2", "pass2", "db2");
I got an error "Warning: Creating default object from empty value in"
Do not use ew_Connect as ew_Connect is generated for database type of your project only (in this case MySQL).
To connect to an external MS SQL Server database, use native codes. For example:
$conn2 = ADONewConnection('ado_mssql');
$conn2->Connect("<connection string>", FALSE, FALSE);
Alternatively, you can generate another project for MS SQL see what the ew_Connect codes look like.
Thanks mobhar for your valuable time to reply my question.
I generated a ms sql project and go through the ew_connect
there it is using
$conn = ADONewConnection('ado_mssql');
but when I use in the mysql project as
function Page_Loading() {
$conn2 = ADONewConnection('ado_mssql');
$conn2->Connect(-----------------------------------------);
}
I got an error as
Fatal error: Call to undefined function ADONewConnection()
So can anyone help me to find out where the function ADONewConnection() is store.
Bishu wrote:
So can anyone help me to find out where the function ADONewConnection() is store.
It is located in your generated "phpfn10.php" which will depend on the "adodb.inc.php" file under the "adodb5" sub folder. Please note that you have to insert that new SQL Server connection function either into your "phpfn.php" template file or "phpfn10.php" file so that it can be accessed anywhere from your desired server event. Refer to the related generated code that suits with your database connection.