Is it possible to connect to DiscountASP's MSSQL db when the script is located on a different server? I am using this to connect: $ConnString="DRIVER={SQL Server};SERVER=tcp:mssql01.discountasp.net;DATABASE=********"; It is running fine while local and the error I am getting is this: Warning: odbc_connect(): SQL error: [Microsoft][ODBC SQL Server Driver]Client unable to establish connection, SQL state 08001 in SQLConnect
this most likely means that the server/network hosting the application blocks 1433 port. Bruce DiscountASP.NET www.DiscountASP.NET
Here is a little update. I managed to connect to the database on DISCOUNT ASP from our serverruning php (4.3.8)using odbc_connect() this is the error message that I am getting: Warning: odbc_exec(): SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]EXECUTE permission denied on object 'sp_cursoropen', database 'master', owner 'dbo'., SQL state 42000 in SQLExecDirect in xxxxxxxxxxxxxxxxxxxxxxxxxxxxx on line 14 Here is how I connect: $conn=odbc_connect('SYSTEM_DSN_NAME','username','password'); if (!$conn) {exit("Connection Failed: " . $conn);} $sql="SELECT id, firstname, lastname FROM dbo.tablename"; $Result=odbc_exec($conn,$sql); System DSM is actually using the root account to login. What am I missing? Thanks,
looks like your application is trying to access the master database which is not permitted. check your DSN setting to make sure you point the default database to your database. Bruce DiscountASP.NET www.DiscountASP.NET
well.. not according to the error. The error says you are trying to do something in the master db. Try change your query to SELECT id, firstname, lastname FROM [yourdatabaseName].dbo.tablename Bruce DiscountASP.NET www.DiscountASP.NET