Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection to SQL Server over Wireless

Status
Not open for further replies.

yamyam

MIS
Jul 3, 2002
19
GB
I am trying to connect to a SQL server on a PPC using wireless. Most times the wireless is connect and the program connects to the db happily.

On certain occasions it fails and I get error message Server does not exist.

I tried to catch the connection.open command

connDB = New SqlConnection(sconn)
cmndDB = New SqlCommand(sSQL, connDB)
ConnectionAttempt:
Try
connDB.Open()
drDetails = cmndDB.ExecuteReader()
Catch exSQL As SqlException
Dim errSQL As SqlError
'
For Each errSQL In exSQL.Errors
ListBox1.Items.Add("SQL Exception - " & exSQL.Message & " " & exSQL.Number)
If exSQL.Number = 17 Then
GoTo ConnectionAttempt
End If
Next
Finally
If connDB.State = ConnectionState.Open Then connDB.Close()
End Try


Can anyone help with the connection loop.

Thanks
 
What is wrong with this version?

What are the errors you get?

Are you sure it is number 17 and only number 17 you want.

shouldn't you better increase the timeout setting?



Christiaan Baes
Belgium

"My new site" - Me
 
If the PPC goes into sleep mode, the WIFI has to refresh and connect to the network before the database can be connected to. I need the program to loop and wait for the connection to be made to the db.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top