Results 1 to 7 of 7

Thread: ASP with MySQL

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264
    I am trying to connect from an ASP page to mysql DB.

    I need the connection string and a basic example.

    questions:

    How diffrent is MySQL from SQL server ?
    Does it return the same recordset object ?
    How do I declare the variables ?
    will a server.createobject ("ADODB.recordset") would work with it or do I need something else ?
    which is better mySQL or Access ?

    Thank you very much

    In the beginning the universe was created. This has made a lot of people very angry and is generally regarded as a bad idea.

    - Douglas Adams
    The Hitchhiker's Guide to the Galaxy

  2. #2
    Lively Member
    Join Date
    Sep 2002
    Location
    São Paulo, SP, Brasil
    Posts
    118
    The main difference is on Connection String.

    I have no prior knowledge to mySQL and ASP myself. But I do have experience with ASP + SQL, ASP + Access, ASP + DB2 and PHP + MySQL.

    And I can tell that everything else will be the same, inside the ASP code. The other difference can come from Query Strings. Since I have no deep knowledge on MySQL, I don't know for sure, but i'm pretty confident that will be some little differences.

    Well, I'm ressurecting this because I was looking for the connection string on ASP + MySQL, I wrote on search "MYSQL Connection" and I didn't found answers. So, I'm asking here, while answering some questions from this guy:

    Someone knows a good string to do the connection? I don't want to use ODBC and I want a code that can work by itself, because I will make tests on one server and copy all to another one. I know there is a good string for this, but since there are 6 months I don't deal with ASP, and I'm with my FTP down, I don't have the code and can't remember it.

    Well, I would modify the code to connect to SQL that I have someplace on my files, but I said I can't access my files rite now.
    --
    Cauê Cavalheiro Machado Rego

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Goto http://www.mysql.net (or is it http://www.mysql.com ?? one of those). Any ways, do a search for MYODBC. It's a component that can be used similar to ADO. THey have examples on how to connect and what the conneciton string needs to look like, etc....
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4
    Lively Member
    Join Date
    Sep 2002
    Location
    São Paulo, SP, Brasil
    Posts
    118
    Originally posted by techgnome
    Goto http://www.mysql.net (or is it http://www.mysql.com ?? one of those.)
    Hehe, take a look at the .NET one... Very funny thing on internet...
    --
    Cauê Cavalheiro Machado Rego

  5. #5
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687


    SOrry about that..... it is .COM after all.... I can never keep them straight..... now that I think about it ... it's http://www.php.NET and http://www.mysql.com ....
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6
    Lively Member
    Join Date
    Sep 2002
    Location
    São Paulo, SP, Brasil
    Posts
    118
    No need to sorry. I found it funny about those sites who use the others name.

    But I still can't make my connection string work.

    Do I need to install something from www.mysql.com on my IIS 2000 Server? If there's no other way, ok. But I wishto know that first...

    I'm back to mysql.com trying to find some answers while someone here can't help me on this issue.

    edit: Oh yeah, I wish to avoid MyODBC. As I said, I want less dependent on external applications as possible to have. Even I need some Class, like one I have to uploading files, which I don't need any extra DLL installed on my IIS.
    Last edited by Cawas; Nov 21st, 2002 at 07:46 AM.
    --
    Cauê Cavalheiro Machado Rego

  7. #7
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Minnesota
    Posts
    830
    Not sure if you got your answer. For a connection string check here:http://www.able-consulting.com/MDAC/...oviderForMySQL

    If you don't want to go there I will paste it in:
    PHP Code:
    oConn.Open "Provider=MySQLProv;" _
               
    "Data Source=mySQLDB;" _
               
    "User Id=myUsername;" _
               
    "Password=myPassword" 

Posting Permissions

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



Click Here to Expand Forum to Full Width