TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
David Smith
NA
2k
0
MySql Connection String
Feb 7 2012 11:41 PM
Can someone tell me whats wrong with my connection string below thats in the app config. The error I am getting An Ole DB provider was not specifiied in the connection string. I tried both ways adding the Ole DB provided and i still get am error. Review below.
<add name="ConnectionString" connectionString="server=xxxx11111;User Id=root;password=mypassword;database=colorDatabase" providerName="MySql.Data.MySqlClient"/>
using (OleDbConnection conn = new OleDbConnection(ConnectionString))
using (OleDbConnection conn = new OleDbConnection(ConnectionString))
{
conn.Open(); //Error Occurs
using (OleDbCommand cm = conn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "GetColorSerialPartNumber";
cm.ExecuteReader();
while (cm.ExecuteReader().Read())
{
Console.WriteLine(cm.ToString());
}
}
}
Reply
Answers (
4
)
Unable to Save
Dataset table adapters