SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Guru
    Join Date
    Dec 2008
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    named pipes provider eror 40. thr' webpage

    i have vs2005 and sql 2000

    if i directly execute any query frm sql its working fine
    but thr' my webpage in vs2005 i get an error
    named pipes provider eror 40. could not open connection to sql2000

    culd u tell me wht to check and how to make it working

  2. #2
    SitePoint Addict kunalraj's Avatar
    Join Date
    Nov 2008
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    check you have import using System.Data.SqlClient.

    check your connection string.

    check after connection string and before write query between them you have write
    connection.Open();

    check out above.

    thanks,
    kunalraj.

  3. #3
    SitePoint Guru
    Join Date
    Dec 2008
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi
    everything was working earlier i had the database on a server and it was working fine
    now i have the database in my loccal pc from where i need to connect

    so the sonnecting string remain the same just instead of server name i gave my local pc name so i feel it shld work

  4. #4
    SitePoint Addict kunalraj's Avatar
    Join Date
    Nov 2008
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    ok so i think check the pc name there should be mismatch.
    otherwise taking your data in gridview on page and it will create connection string
    copy and paste it.


    thanks,
    kunalraj.

  5. #5
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,878
    Mentioned
    47 Post(s)
    Tagged
    0 Thread(s)
    the configuration on the sql2000 server is incorrect and therefor you cannot connect. You need to check that named pipe lines are allowed for remote connections on the server and also make sure you dnt have any firewall running blocking the connecting.

    To test the connection, make a new blank text file on ur desktop. Then rename it to watever.udl. Double click on it. Click the 1st tab. Select sql server and click next. Then fill in all ur server details and test the connection.

    Trouble shoot that way.

    Good luck

  6. #6
    SitePoint Guru
    Join Date
    Dec 2008
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in my web config , connection string i added trusted_conection=yes

    and in command prompt i checked
    osql/snp:\\.\pipe\sql\query

    i get the eror msg nost associated with a trusted sql server connection
    and the same messgae i get thr' webpage


    how do i checked for named pipes and how do i rectify

  7. #7
    SitePoint Guru
    Join Date
    Dec 2008
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    and one more hthing i forgot to tell is i am using windows authentication

  8. #8
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,878
    Mentioned
    47 Post(s)
    Tagged
    0 Thread(s)
    1st step is to make sure its not the firewall. Telnet port 1433 on the server and see if you can connect. You might just need to implement impersonation.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •