Connection from ASP to SQL server

Discussion in 'ASP General' started by Bob Barrows [MVP], Feb 7, 2005.

  1. vichet wrote:
    > Dear All;
    >
    > I have two servers: Webserver(WebServer) and Database
    > server(DBServer).
    >
    > In Webserver, i asp to connect to sqlserver in dbserver. but i can not
    > connect it, it show error "No Trust Connection"
    >
    > but the save connection string, when i used it in VB, it is ok. Also
    > i can connect from webserver to dbserver by using Analy Query, it is
    > ok
    >
    > please help "How to connect it". below is my asp code:
    >
    >
    > <%
    > set cnt=server.createobject("adodb.connection")
    > cnt.open "Provider=SQLOLEDB.1;Data Source=Dbserver;Initial
    > Catalog=MyDB;Uid=dbadmin;pwd=root"
    >
    > .
    > .
    > .
    > %>
    >
    > Vichet

    Your error is covered in this article:
    http://www.aspfaq.com/show.asp?id=2009

    Bob Barrows
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Feb 7, 2005
    #1
    1. Advertising

  2. Bob Barrows [MVP]

    vichet Guest

    Dear All;

    I have two servers: Webserver(WebServer) and Database server(DBServer).

    In Webserver, i asp to connect to sqlserver in dbserver. but i can not
    connect it, it show error "No Trust Connection"

    but the save connection string, when i used it in VB, it is ok. Also i can
    connect from webserver to dbserver by using Analy Query, it is ok

    please help "How to connect it". below is my asp code:


    <%
    set cnt=server.createobject("adodb.connection")
    cnt.open "Provider=SQLOLEDB.1;Data Source=Dbserver;Initial
    Catalog=MyDB;Uid=dbadmin;pwd=root"
    vichet, Feb 7, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UmV6YQ==?=
    Replies:
    3
    Views:
    17,890
    Carlos Barini
    Jun 7, 2004
  2. Daves
    Replies:
    1
    Views:
    362
  3. Joey
    Replies:
    3
    Views:
    4,419
  4. Geoff
    Replies:
    3
    Views:
    431
    Patrick.O.Ige
    Jan 16, 2006
  5. farseer

    SQL Server 2005 + SQL Server Express

    farseer, Aug 7, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    333
    farseer
    Aug 8, 2006
Loading...

Share This Page