Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searched and searched.. still can't ole into mysql

Status
Not open for further replies.

jmille34

Programmer
Joined
Sep 14, 2005
Messages
224
Location
US
I have a whole application built around using oledb and a microsoft access database. Now they want me to convert the database over to mysql, but I have oledb all throughout my application, so I want to use OLEDB, but I can't get it to connect. I have tried a million different suggestions, and none of them at worked even a little.. far too many to list here. Does anyone know the simple answer of whether or not there is a reliable api for vb.net to use mysql using my preexisting ole oriented code? I've also tested a very wide assortment of connect strings, but nada.. :( If anyone really wants me to list things, I will do it, but I will have to look them up again
 
Yeah, I tried that earlier, and I just tried it again.. who knows if I did it right or if it just doesn't work, though.

Code:
CN_STUDENTS = "Provider=MySQLProv;Location=tt3;Data Source=students;User Id=root;Password=xxxxx;"
CNS.ConnectionString = CN_STUDENTS
STUDENTDBADAPTER = New OleDbDataAdapter("", CNS)
CNS.open()

where:
"tt3" is the name of the server
"students" is the name of the database

When I get to CNS.open() it pops up a window "MySQL Data Source Name Setup", and no matter what I type, it won't continue.. of course ideally that window should not show at all, but at this point I'll take what I can get.
 
Do you have/need New on your CNS object instantiation?

Have a great day!

j2consulting@yahoo.com
 
Well, yes, but I shortened it for the post.. I had to pull those pieces from different parts of the app. I'm not sure why I put ththe extra lines in that block. It doesn't add much to the question.

The whole app works great with ms access, as-is. I have ported the access db over to sql server and used the sql ole provider, and that worked perfectly too. But I did that as a test, hoping it would be roughly equivalent to porting over to mysql before I went to the trouble of setting up a linux mysql server. But I assumed the stinking ole provider would work as intended.
 
Hello jmille34,

I don't know if these links will help or not:

Using MySQL with Visual Studio

Something about setting ConnectionProperties to NoPrompt

A step by step link

If you Google your error message you will find these and others. Good Luck!

Have a great day!

j2consulting@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top