Problem Accessing SQl Server Database via ASP.

  • We are not able to connect to the sql server database via asp,using Vb it does connect.

    The only difference I see is that the sql server has been installed in an instance.

    Any one Can help?

    Pay Respect to People on your way up. For you will meet the same People on your way down.


    He who knows others is learned but the wise one is one who knows himself.

  • I need to know how do I mention the instance name in the connection string.

    This is what I am doing

    oCon.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=aaa;Data Source=servername\instance"

    Pay Respect to People on your way up. For you will meet the same People on your way down.


    He who knows others is learned but the wise one is one who knows himself.

  • Hi brokenrulz,

    quote:


    I need to know how do I mention the instance name in the connection string.

    This is what I am doing

    oCon.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=aaa;Data Source=servername\instance"


    maybe this could help you http://www.sqlservercentral.com/columnists/awarren/worstpracticebadconnectionstringsandbadinfoinsyspr.asp ?

    Frank

    http://www.insidesql.de

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • What I have noticed is that if I use Named Pipes in client network configuration I can connect to the sql server (The server is on the lan). But if i change it to tcp/ip it does not connect through vb also.

    Is it because

    1.The fire wall is blocking requests send from 1433 port of my machine. ( I may be wrong)

    2. 1433 port is blocked on the server where sql server is installed.

    Pay Respect to People on your way up. For you will meet the same People on your way down.


    He who knows others is learned but the wise one is one who knows himself.

  • Or the server isn't listening for sockets (check the server network utility).

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

    The Best of SQL Server Central.com 2002 - http://www.sqlservercentral.com/bestof/

    http://www.dkranch.net

  • I am able to connect via both ASP and VB if I use TCP/IP.However named pipes don't work.

    Any reasons that prevents ASP pages from connecting when Named pipes is used.

    He who knows others is learned but the wise one is one who knows himself.


    He who knows others is learned but the wise one is one who knows himself.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply