Connect to MYSQL with ASP.Net

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Connect to MYSQL with ASP.Net

    I am trying to connect to a MYSQL database from an ASP.net page I copied the
    format below from another website.

    "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost;
    DATABASE=Your_Mysql_DB; UID=mysql_username; PASSWORD=mysql_password; OPTION=3"

    The connection tests fine and looks great but when I test the page it says I
    need an OLE DB Provider specified in the connection string. It gave me an
    example "Provider=SQLOLEDB;"

    This is all very new to me. I hardly know what a provider is. Can someone
    please give me an example of what provider I could use for MYSQL? I appreciate
    any help you can give.

    Thank You

    dischord13 Guest

  2. Similar Questions and Discussions

    1. #40207 [NEW]: Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL ser
      From: arif at peshawaronline dot com Operating system: PHP version: 4.4.4 PHP Bug Type: Compile Warning Bug description: ...
    2. ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
      When i try to start my mysql server, i get this error ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'...
    3. PHP to mySQL connect...
      I have 2 machines, a server (Win NT server) and a workstation (Win XP Pro). On the server I have PHP, mySQL, Apache, Perl, etc. If I run this...
    4. Seen this message? Can't connect to local MySQL server through socket '/tmp/mysql.sock'
      Seen this message? Can't connect to local MySQL server through socket '/tmp/mysql.sock' I got this trying to install DBI and DBD for mysql from...
    5. Seen this message? Can't connect to local MySQL server throughsocket '/tmp/mysql.sock'
      Allen Marshall wrote: I just saw it in another newsgroup. Don't multi-post! -- Gunnar Hjalmarsson Email:...
  3. #2

    Default Re: Connect to MYSQL with ASP.Net

    Not sure if this will help, but did a quick Google search and this article
    series appeared:

    [url]http://www.15seconds.com/issue/050210.htm[/url]
    [url]http://www.15seconds.com/issue/050407.htm[/url]

    Best regards,
    Chris


    Chris In Madison Guest

  4. #3

    Default Re: Connect to MYSQL with ASP.Net

    Hi there, I am having a similar problem. I tried both, the ASP.NET C# and the
    ASP.NET VB server model. Both returned the following results. But first... here
    is my setup: Dev Machine: - Windows XP Pro SPII - IIS 5.1 - MySQL 4.1 - MySQL
    ODBC 3.51 Driver - Microsoft .NET SDK Computer Dreamweaver MX 2004 is
    installed on: - Mac OS X 10.3.8 - DW MX 2004 7.0.1 version - Using following
    connection string with the OLE DB connection type: 'DRIVER={MySQL ODBC 3.51
    Driver}; SERVER=localhost; DATABASE=mydb; USER=dbuser; PASSWORD=dbuserpass;
    OPTION=3' When I test the connection everything is great. Dreamweaver
    connected successfully. So, it seems that all is well there. I would like to
    add that dbuser had all priviledges as the root user (I just wanted to rule out
    any possible permission problems). When I open a new document in dreamweaver
    and click the Bindings tab, then click the + button to create a new DataSet
    (Query), select my previously create connection that tested successfully, I get
    in the table select tab following message: *** No Table Found Now, I know for
    sure that this particular Database had 3 tables in the database, and since this
    particular user has all priviledges on all databases and tables in those
    databases as the root user, it really can't be a permissions problem. Further
    more: When I connect to this database with the PHP/MySQL server model (using
    my Free BSD production server as the application server, because it has PHP
    installed), and connect to that MySQL database residing on my Windows XP Dev
    Box, and do a simple select Query, all tables are listed to be selected, not a
    problem. Conclusion: Is there some sort of a compatibility problem with
    Dreamweaver's ASP.NET server models using MySQL as a database? One more thing
    ... I tried setting up a connection to my product MySQL database server (wich is
    running Free BSD OS) with the ASP.NET server model and my Windows XP Pro dev
    box... same problem... no tables found. It's too weird. I just don't get it.
    What is going wrong here. I tried doing searching on the internet for any sort
    of tutorial for ASP.NET server model in Dreamweaver MX 2004, using MySQL as a
    database server and ODBC driver, but there is not much info out there. It's
    quite strange. Perhaps someone at MM or a senior developer on here can shed
    some light on this strange situation. Thank you, Martin Lerch

    Mr. L Guest

  5. #4

    Default Re: Connect to MYSQL with ASP.Net

    Hello dischord13,

    You may check following forum post at
    [url]http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=263&thre[/url]
    adid=990645.

    The post is long, and I may need to work on my English composition and writing
    skills as Clinton G. puts it, but maybe you'll get something out of it. It at
    least works for me.

    Bye for now,

    Mr. L Guest

  6. #5

    Default Re: Connect to MYSQL with ASP.Net

    Thanks! I will go through that carefully. I made similar progress and tried
    "MySQLProv" but then got "unidentified error" message. I had just given up and
    decided to stick with PHP!! I appreciate the detail and don't listen to
    Clinton. Some people are... well, I don't want them to delete my e-mail for
    profanity so I wont say it. But thanks, great post. I'll try connecting again.

    dischord13 Guest

  7. #6

    Default Re: Connect to MYSQL with ASP.Net

    I have the same problem. When I test the connection it works fine, but when I
    try the page I receivin the error about the "Provider".
    If write the connection as it is explained by 15seconds it works fine. I have
    the udl file too but nothing.

    Please if somebody has a solution .

    gbarret Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139