468,792 Members | 1,701 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,792 developers. It's quick & easy.

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 1255

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
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.