S
staffan
Hi
Maybe I have missed something easy but I cant get Async = true fo function,
I am getting the: "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. (provider: Named Pipes Provider, error: 40 - Could not open a
connection to SQL Server) " on the "myConnection.Open()" statement. And I
have "<%@ Page Language="VB" debug="true" Culture="sv-SE" Async="True"
AsyncTimeout="10" %>" in the beginning of the file.
Please help!
Thanx!!
/Staffan
My code:
Dim myConnection As SqlConnection = New
SqlConnection("server=localhost;uid=XX;pwd=YY;database=Egna_lonelanken;Asynchronous
Processing=true")
myConnection.Open()
Dim reader As SqlDataReader
Dim command As New SqlCommand("pPercentil", myConnection)
command.CommandType = CommandType.StoredProcedure
Dim service As SqlParameter =
command.Parameters.Add("@uppsattnr", SqlDbType.Int)
service.Direction = ParameterDirection.Input
service.Value = 2380
Dim result As IAsyncResult = command.BeginExecuteReader()
reader.Read()
reader.Close()
myConnection.Close()
Maybe I have missed something easy but I cant get Async = true fo function,
I am getting the: "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. (provider: Named Pipes Provider, error: 40 - Could not open a
connection to SQL Server) " on the "myConnection.Open()" statement. And I
have "<%@ Page Language="VB" debug="true" Culture="sv-SE" Async="True"
AsyncTimeout="10" %>" in the beginning of the file.
Please help!
Thanx!!
/Staffan
My code:
Dim myConnection As SqlConnection = New
SqlConnection("server=localhost;uid=XX;pwd=YY;database=Egna_lonelanken;Asynchronous
Processing=true")
myConnection.Open()
Dim reader As SqlDataReader
Dim command As New SqlCommand("pPercentil", myConnection)
command.CommandType = CommandType.StoredProcedure
Dim service As SqlParameter =
command.Parameters.Add("@uppsattnr", SqlDbType.Int)
service.Direction = ParameterDirection.Input
service.Value = 2380
Dim result As IAsyncResult = command.BeginExecuteReader()
reader.Read()
reader.Close()
myConnection.Close()