How to connect SQL Database from Server 2005 through dyndns in php,
My dyndns address - xxx-xxx.dyndns.org
Port - 3389(default)
This is the code i am using:
Expand|Select|Wrap|Line Numbers
- $dsn = 'DRIVER={SQL Server};SERVER=xxxx-xxxx.dyndns.org:3389\SQLEXPRESS;DATABASE=CXXXXXXC';
- $connection = odbc_connect($dsn,'sa','xxxxxx') or die('ODBC Error:: '.odbc_error().' :: '.odbc_errormsg().' :: '.$dsn);
Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid connection., SQL state 08001 in SQLConnect in C:\wamp\www\qamaruae\components\com_amc1234\views\ amc1234\tmpl\statement.php on line 3
ODBC Error:: 08001 :: [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid connection. :: DRIVER={SQL Server};SERVER=xxxx-xxxxx.dyndns.org:3389\SQLEXPRESS;DATABASE=xxxxxxxx xxx
Please helpme