B
Baba
Hi,
using ADODB in ASP pages we have this strange problem.
If we create an ADODB connection specifying the DNS server name instead of
IP server address, then sometimes, during call to Execute method we get this
error:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
access denied.
The code looks simply like:
<%
Dim cn, rst
Set cn = Server.CreateObject("ADODB.Connection")
cn.ConnectionString = "Driver={SQL Server};Server=sql.acme.com;Initial
Catalog=SomeDB;User Id=...;Password=..."
cn.Open
Set rst = cn.Execute("SELECT * FROM SomeTableWHERE ...")
....
rst.Close
Set rst = Nothing
cn.Close
Set cn = Nothing
%>
In my opinion, the strange things are:
1) No problem appears if we specify IP Server address
2) The problem is on the Execute and not on the cn.Open()
3) The problema appears sometimes
We tried to add a line to hosts file too, to avoid use of resolver (in the
hypotesys of name server problems) but nothing changed: the error still
happens randomly.
Unluckly, now we have to use the server name instead of IPAddress for the
cohexistence of web and windows application from inside/outside LAN area.
Thank you in advance.
using ADODB in ASP pages we have this strange problem.
If we create an ADODB connection specifying the DNS server name instead of
IP server address, then sometimes, during call to Execute method we get this
error:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
access denied.
The code looks simply like:
<%
Dim cn, rst
Set cn = Server.CreateObject("ADODB.Connection")
cn.ConnectionString = "Driver={SQL Server};Server=sql.acme.com;Initial
Catalog=SomeDB;User Id=...;Password=..."
cn.Open
Set rst = cn.Execute("SELECT * FROM SomeTableWHERE ...")
....
rst.Close
Set rst = Nothing
cn.Close
Set cn = Nothing
%>
In my opinion, the strange things are:
1) No problem appears if we specify IP Server address
2) The problem is on the Execute and not on the cn.Open()
3) The problema appears sometimes
We tried to add a line to hosts file too, to avoid use of resolver (in the
hypotesys of name server problems) but nothing changed: the error still
happens randomly.
Unluckly, now we have to use the server name instead of IPAddress for the
cohexistence of web and windows application from inside/outside LAN area.
Thank you in advance.