Connect to MySQL through Web.Config

Posted on 2007-10-14
Last Modified: 2008-11-04
I've connected to MS access in my pages by linking to the web.config like this:
<add key="DSN" value="Provider=Microsoft.Jet.OleDb.4.0;Data Source=C:\Inetpub\wwwroot\Text\mydb.mdb" />      

Dim objConn As New OleDbConnection(ConfigurationSettings.AppSettings("DSN"))

I'm now using MySQL for my db and ASP.NET 2.0 but I'm not sure how to do this now.  Can someone help me with this?
Question by:azyet24
    LVL 22

    Accepted Solution

    try this
    <add key="AdMentorConnString" value="Driver={MySQL ODBC 3.51 Driver};Server=localhost;Port=3306;Option=131072;Stmt=;Database=admentornet;Uid=root;Pwd=;" />

    snippet from here

    LVL 26

    Expert Comment

    have a look at for all kinds of connectionstring samples on how to connect to mysql


    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now