471,088 Members | 1,277 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,088 software developers and data experts.

How to Connect SQL database from server2005 over dyndns in php?

Dear all,

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
  1. $dsn = 'DRIVER={SQL Server};SERVER=xxxx-xxxx.dyndns.org:3389\SQLEXPRESS;DATABASE=CXXXXXXC';
  2. $connection = odbc_connect($dsn,'sa','xxxxxx') or die('ODBC Error:: '.odbc_error().' :: '.odbc_errormsg().' :: '.$dsn); 
And the error like this

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
Nov 19 '10 #1
0 1298

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by venkatesh | last post: by
3 posts views Thread by Raymond Chiu | last post: by
3 posts views Thread by iedayah88 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.