Re: error: odbc in vista (with asp)



On Oct 20, 11:47 am, Milto...@xxxxxxxxx wrote:
i dont connect db (sql server 2005) in vista. why?
i have a cod in asp and no conect database.

the error is:

"Microsoft SQL Native Client Version 09.00.3042

Running connectivity tests...

Attempting connection
[Microsoft][SQL Native Client]TCP Provider: No connection could be
made because the target machine actively refused it.

[Microsoft][SQL Native Client]Login timeout expired
[Microsoft][SQL Native Client]An error has occurred while establishing
a connection to the server. When connecting to SQL Server 2005, this
failure may be caused by the fact that under the default settings SQL
Server does not allow remote connections.

TESTS FAILED!"

The code asp:

<%@ Language=JScript %>
<html><head><title>....</title></head><body>
<%
var CS = Data Source=FONTEZ-AF96F4F1\SQLEXPRESS;Initial
Catalog=mydb_2;Integrated Security=True;
var myConnection = Server.CreateObject("ADODB.Connection");
myConnection.open(CS);

myRecordSet = myConnection.Execute("select * from aluno");
%>
<table border="1">
<%
while(!myRecordSet.eof){ %>
<tr><%
for(Index=0; Index < (myRecordSet.fields.count); Index++) {
%> <td> <%= myRecordSet(Index) %> </td><%
}
myRecordSet.MoveNext();
%>
</tr><%

}

myRecordSet.Close();
myConnection.Close();
%>
</table>

</body></html>

the problems? where?

Hello,

Is this problem specific to the vista operating system?
Is sqlserver configured to accept tcp connections?
Have you verified the sqlserver tcp listening port?
Is this a local or remote connection?
Are there firewalls around your sqlserver box?
On the server -- use a combination of "netstat -ano|findstr <port>"
and the sqlserver error log to check that sqlserver is listening on
the port that you think it is .
On the client -- try "telnet <serverip><sqlserver port>" and see if
this works


Best Regards

.



Relevant Pages

  • Re: ASP form write to DB issue
    ... Do a response.write with the SQL and try running that using whatever tool ... that posts the input to a ASP page (the ASP page must establish a ... ' Creating Connection Object and opening the database ... Set con = CreateObject ...
    (microsoft.public.scripting.vbscript)
  • Connection Pooling in ASP
    ... When connections are pooled in ASP to an SQL backend, ... times for a scheduling program and compare that using a join to the already ...
    (microsoft.public.inetserver.asp.db)
  • Re: IIS State - help appreciated
    ... > previously web classes managed it all. ... ASP page, but writing code around it, is possibly giving problems. ... > correctly and performance wise SQL seems fine - it's certainly not working ... it will not release a connection soon as well:) ...
    (microsoft.public.inetserver.iis)
  • Re: SQL server connection in the sleeping mode
    ... We are using ASP.NET with ADO.NET to connect to SQL ... using connection pool, and in our test environment after while we run out of ... server to automatically drop sleeping connection after x amount of time ... Use this account to connect to SQL via ASP page. ...
    (microsoft.public.sqlserver.programming)
  • Re: SQL Network Interfaces, error: 26
    ... from a programs point of view there is no difference between sqlexpress and sqlserver 2005. ... How do I change it to point to the SQL Server2005? ... I do not have SQL Server 2005 installed. ... An error has occurred while establishing a connection to the server. ...
    (microsoft.public.dotnet.framework.aspnet)

Loading