#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    May 2013
    Posts
    1
    Rep Power
    0

    problem with connecting to mySQL


    Hi..i have a hosting space and database taken from net4india..when i try to connect to the database using the following codes i get a internal server error 500..i am not able to understand what exactly is the problem with the codes

    i have contacted the hosting company a number of times thy say its all fine check ur coading

    plz help!

    <HTML>
    <HEAD>
    <TITLE>Untitled Document</TITLE>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    </HEAD>

    <BODY BGCOLOR="#FFFFFF">

    <%
    Dim sConnection
    Dim oConnection
    Dim oRS

    sConnection = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=00.00.000.00; DATABASE=xxxxxx; UID=xxxxxx;PASSWORD=xxxx; OPTION=3"

    Set oConnection = Server.CreateObject("ADODB.Connection")

    oConnection.Open sConnection

    Set oRS = oConnection.Execute("SELECT * FROM Table")

    While Not oRS.EOF
    Response.Write oRS("Name")
    oRS.MoveNext
    Wend

    oRS.Close
    Set oRS = Nothing

    oConnection.Close
    Set oConnection = Nothing
    %>




    </BODY>
    </HTML>
  2. #2
  3. Contributing User
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Aug 2008
    Location
    USA
    Posts
    1,606
    Rep Power
    347
    Hi,

    you may use this connection string website, here you can find all the types of connection string

    try with this:

    Code:
    Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;
    Password=myPassword;
    if you found this post is useful click Give Rep button (bottom side on this reply ) and agree

    Jquery Shake Effect ,
    Andriod KitKat


    Thank You,
    KiranK
  4. #3
  5. Contributing User
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Mar 2005
    Location
    Columbus, OH
    Posts
    1,665
    Rep Power
    283
    Usially 500 error means server can not compile your page, change your ie settings to uncheck "show friendly http error massages" under internet options/advanced it should see more details
    GK
    __________________________________________________ _____
    if you found this post is useful click Give Rep button (bottom side on this reply ) and agree

Similar Threads

  1. Problem connecting to mysql
    By paul2010 in forum ASP Development
    Replies: 1
    Last Post: February 15th, 2010, 09:06 PM
  2. Asp connecting to mysql
    By paul2010 in forum ASP Development
    Replies: 2
    Last Post: February 5th, 2010, 10:57 AM
  3. ASP, MySql and connecting to a DB on a remote server
    By acc999 in forum .NET Development
    Replies: 0
    Last Post: November 10th, 2005, 09:41 PM
  4. problem connecting to mysql server via php
    By ehsanking in forum Programming Help
    Replies: 1
    Last Post: July 25th, 2005, 11:25 AM
  5. Connecting to MySQL with ASP
    By dawson_davis in forum ASP Development
    Replies: 17
    Last Post: January 3rd, 2004, 04:08 PM

IMN logo majestic logo threadwatch logo seochat tools logo