Knowledgebase: Samples Coding
ASP .NET OLEDB for MySQL
Posted by - NA - on 01 October 2010 11:30 AM
Issue

Not sure with settings of  ASP .NET OLEDB for MySQL


Symptoms

None


Cause


Lack of knowledge with the ASP .NET OLEDB for MySQL


Workaround

STEP 1: Obtain the Sample Working Code from http://www.netonboard.com/download/OLEDBformysql.zip

STEP 2: There are 1 folder and 1 sql file in the zip file.
    - Folder Name    : wwwroot
    - SQL File Name : oledbformysql.sql

STEP 3: Extract the zip file.

STEP 4: Create a Mysql Database via DotNetPanel by referring to http://www.supportchain.com/index.php?/Knowledgebase/Article/View/215/0/how-to-create-a-mysql-database-in-dotnetpanel

Database name : mysqlsampledb
Database username : YOURDATABASEUSERNAME
Database Password : YOURDATABASEPASSWORD

STEP 5: Import the mysql structure in your newly create database with following steps:

a) Login to http://mysql.YOURDOMAINNAME/
b) On the left panel, select the database that you wish to populate.
c) On the right panel, click on 'SQL'.
d) Paste the SQL Scripts that need to be imported in the 'TextArea'.
e) Click on 'Go' button to generate populate the database.

STEP 6: Edit the web.config file.

<add key="ConnectionString" value="Persist Security Info=False;database=mysqlsampledb;server=localhost;Connect Timeout=30;username=YOURDATABASEUSERNAME;password=YOURDATABASEPASSWORD"/>

Replace the database username and password with the correct credentials value.

STEP 7: Upload those files into your main domain or sub domain folder ad ensuring that folders and files structure are in order.

STEP 8: Access the Uploaded Sample Code via http://YOURDOMAINAME/mysqlsample.aspx with web browser e.g: IE or Firefox.


Additional Information

If you are unable to resolve the problem above, kindly issue a ticket to Support Team.

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).