Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Time out Expired in SQL7 with .NET 2

Time out Expired in SQL7 with .NET 2

Scheduled Pinned Locked Moved Database
csharphelpdatabasesql-serverdotnet
3 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rmhewa
    wrote on last edited by
    #1

    I have one of my c# applications coded using .net framework 1.1, which works fine. Recently I installed Visual Studio 2005 - Professional edition on the same machine (Arter formating and reinstalling Windows 2000 with SP4) and now the above application takes a long time to open the connection to SQL Server 7. My connection string is as follows "user id=sa;password=;initial catalog=FINISHED_GOODS_STOCK;data source=naturubmain;Connect Timeout=30" Once I try to open the connection it gave me 'Time out expired' error. I set the 'Connect Time out' to 0 just to find how long does it take to open the connection. It took above 1 minute and opend the connection. Pls help me. Withot fixing this I will not be able to enjoy the new features of VS2005

    F 1 Reply Last reply
    0
    • R rmhewa

      I have one of my c# applications coded using .net framework 1.1, which works fine. Recently I installed Visual Studio 2005 - Professional edition on the same machine (Arter formating and reinstalling Windows 2000 with SP4) and now the above application takes a long time to open the connection to SQL Server 7. My connection string is as follows "user id=sa;password=;initial catalog=FINISHED_GOODS_STOCK;data source=naturubmain;Connect Timeout=30" Once I try to open the connection it gave me 'Time out expired' error. I set the 'Connect Time out' to 0 just to find how long does it take to open the connection. It took above 1 minute and opend the connection. Pls help me. Withot fixing this I will not be able to enjoy the new features of VS2005

      F Offline
      F Offline
      Frank Kerrigan
      wrote on last edited by
      #2

      It looks like your not getting a connection to your SQL server. YOu also might want to try and add an Instance name to your connection string. "user id=sa;password=;initial catalog=FINISHED_GOODS_STOCK;data source=naturubmain\DEFAULT;Connect Timeout=30" Try and create a test connection windows ODBC tool.

      R 1 Reply Last reply
      0
      • F Frank Kerrigan

        It looks like your not getting a connection to your SQL server. YOu also might want to try and add an Instance name to your connection string. "user id=sa;password=;initial catalog=FINISHED_GOODS_STOCK;data source=naturubmain\DEFAULT;Connect Timeout=30" Try and create a test connection windows ODBC tool.

        R Offline
        R Offline
        rmhewa
        wrote on last edited by
        #3

        Thanks for your advice. Later I found the problem was with the name resolving of our network. I replaced the server name with the IP address of the server in the connection string and now its working fine. :)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups