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. SQL Server does not exist or access denied

SQL Server does not exist or access denied

Scheduled Pinned Locked Moved Database
helpdatabasesql-serversysadminquestion
1 Posts 1 Posters 0 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.
  • Y Offline
    Y Offline
    yyf
    wrote on last edited by
    #1

    I have a problem here. I tried to connect sqlserver as many time as I can in one function, because I want to know about the limitation of connection of sqlserver, btw, the sqlserver is not in my computer, the code is like : private void ExecuteCommand_ConnTest_process() { ArrayList conn = new ArrayList(3000); int num = 0; string conn_s = "..."; conn_s += "Connect Timeout=600;Max Pool Size=1000000;"; try { while ( true ) { conn.Add(new SqlConnection(conn_s)); ((IDbConnection)conn[num]).Open(); num ++; Thread.Sleep(10); } } catch( InvalidOperationException ioexp ) { StringBuilder buildError = new StringBuilder(); buildError.Append( "InvalidOperationException thrown when trying to connect " ); buildError.Append( ", error given = " + ioexp.Message); MessageBox.Show(builderError.ToString()); } catch ( Exception e ) { StringBuilder buildError = new StringBuilder(); buildError.Append( "Exception thrown when trying to connect " ); buildError.Append( ", error given = " + e.Message ); MessageBox.Show(builderError.ToString()); } finally { MessageBox.Show(builderError.ToString()); } } After certain number connections, such 6000, it throws an exception: "SQL Server does not exist or access denied". Then I found I can not access Internet. I have to restart my computer. Why this happened? What's wrong with my code? Could anyone please tell me? Thanks in advance!

    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