1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

ASP connection string to SQL Server 2005

Discussion in 'C#' started by gile, Oct 6, 2006.

  1. #1
    HEELLLPPPPP

    I need to change from sql server 2000 to sql server 2005

    PROBLEM

    i need a set of steps to connect to the sql 2005 in ASP web page
    i have made an ODBC connection to the server, like for sql2000 but no good.

    server name = damir

    Urgent Please

    Regards


    GILE
     
    gile, Oct 6, 2006 IP
  2. gile

    gile Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I have given up on SQL Server 2005

    BLOODY BILLY

    MYSQL is the way to stick with


    REGARDS
     
    gile, Oct 6, 2006 IP
  3. Free Born John

    Free Born John Guest

    Messages:
    111
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Set objDBConn = Server.CreateObject("ADODB.Connection")

    objDBConn.ConnectionString="driver={SQL Server};" _
    & "server=myserver;" _
    & "uid=mywebuser;" _
    & "pwd="verysecretindeed;"

    objDBConn.Open
    objDBConn.DefaultDatabase = "mydatabase"
     
    Free Born John, Oct 6, 2006 IP
  4. ludwig

    ludwig Notable Member

    Messages:
    2,253
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    225
    #4
    <%
    dim strSQL
    set Global_DBConnection=Server.CreateObject("ADODB.Connection")
    DSN="Driver={SQL Server};Server=[B]000.000.000.000[/B];Database=[B]DATABASENAME[/B];UID=[B]USERNAME[/B];PWD=[B]PASSWORD[/B]"
    Global_DBConnection.Open(DSN)
    %>
    Code (markup):
    change the words in BOLD with the ones you need
     
    ludwig, Oct 6, 2006 IP