VB.Net app SQLDataAdapter switching from Wired (LAN) to Wireless network (WAN)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mattvr6
    New Member
    • Feb 2010
    • 3

    VB.Net app SQLDataAdapter switching from Wired (LAN) to Wireless network (WAN)

    I have a small VB.Net project that queries a sql database every 5 minutes, using SQLDataAdapter and SQLConnection. This is generally fine however if a user moves location - moving from the LAN to the WAN environment I get an error. Is there anyway to refresh my connections?
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    What type of error do you get? Need more details, i.e. error number, error message. It will be much easier to debug your code.

    Comment

    • mattvr6
      New Member
      • Feb 2010
      • 3

      #3
      I beleive the error number was 5 and the message was simply 'General netwrok error.....'

      the exception I'm now catching is System.Data.Sql Client.SqlExcep tion

      Comment

      • sashi
        Recognized Expert Top Contributor
        • Jun 2006
        • 1749

        #4
        Operating system error 5: "5(error not found)" (Microsoft SQL Server: Error 5120)".
        Post the sql connectionstrin g details, let me check.

        Comment

        • mattvr6
          New Member
          • Feb 2010
          • 3

          #5
          .ConnectionStri ng = "workstatio n id=UKLONN6355;p acket size=4096;user id=radarbb;data source='UKLON20 6\VS';persist security info=True;initi al catalog=PopIT;p assword=thepass word"

          Comment

          • sashi
            Recognized Expert Top Contributor
            • Jun 2006
            • 1749

            #6
            Try without the [workstation id=] parameter. Why do you have to specify this parameter? Any specific reason? This parameter is only required to specify the name of the client machine that is connection to SQL server.

            Comment

            Working...