How to connect to a sql database using classic asp?

前端 未结 3 1012
走了就别回头了
走了就别回头了 2020-12-12 04:34

Could someone please help solve this problem?

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-12 04:41

    <% 'database
    dbserver = ""
    dbcatalog = ""
    dblogin = ""
    dbpassword = ""
    'connection string
    Set conn = Server.CreateObject("ADODB.Connection")
    conn.Open = "Provider=SQLOLEDB; Data Source=" & dbserver & ";Initial Catalog=" & dbcatalog & ";User Id=" & dblogin & ";Password=" & dbpassword
     %>
    

    this is the one i use. check out http://www.connectionstrings.com/ for a bunch more

提交回复
热议问题