ASP and MySQL connectivity
Results 1 to 4 of 4

Thread: ASP and MySQL connectivity

  1. #1
    Senior Member
    Join Date
    Jun 2003
    Posts
    220

    ASP and MySQL connectivity

    Hi guys,

    I am in a great trouble.
    I am trying to establish a connection between MySQL and ASP file.
    I have a webserver having database in MySQL
    I have an asp file in which following code is written:


    <%@ Language=VBScript

    set con=Server.CreateObject("ADODB.Connection")
    con.Open ("DRIVER={MySQL ODBC 3.51 Driver}; Server=localhost;Database=DB_admin;uid=UserN;pwd=password;")
    Session.Timeout=1000

    set rs=Server.CreateObject("ADODB.Recordset")

    uid=trim(Request.Form("uid"))
    pwd=trim(Request.Form("pwd"))

    session("id")=""

    if trim(uid)<>"" and trim(pwd)<>"" then
    rs.Open "select * from login where id='" & trim(uid) & "' and password='" & trim(pwd) & "'",con
    if not rs.EOF then
    ......
    ......

    %>

    But I am unable to establish the connection.
    Please help.

    Thanks.
    Now is the moment, or NEVER!!!

  2. #2
    Senior Member
    Join Date
    Jun 2003
    Posts
    220
    I forget to mention that I am running this code on Linux server.
    Now is the moment, or NEVER!!!

  3. #3
    Developer Extraordinar
    Join Date
    Jul 2002
    Location
    Internets
    Posts
    571
    Are you using mod_mono? If so, a quick search on their site turned up Connector/Net (I don't do much .NET stuff, but have used Connecter/J for Java stuff). The Mono-Project MySQL page is pretty informative. What kinds of errors are you getting, and what server version?

    enmand
    Come to UnError.com

  4. #4
    Senior Member
    Join Date
    Jun 2003
    Posts
    220
    I m including the connection string in ther code itself.
    I am not sure if VBScript is going to work on Linux or not.
    The code is not in .NET but in plain asp. All other pages are in HTML.

    Both the links are pointing at .NET pages.
    Now is the moment, or NEVER!!!

Posting Permissions

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

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides