MYSQL and vb.net in Visual Web developer

Bodwad

Guppy
Hello

I am a new programmer to MYSQL and Visual Web Developer. I am trying to connect to the MYSQL server on my account but I cant for the life of me work out what the connection string should be. After looking through loads of different sources I have become very confused. My current string is

ADODBString = "DRIVER={ MySQL ODBC 3.51 Driver };SERVER=mysql2.g********.com;DATABASE=Bodwad_mydb;" & _
"USER=MyUsername;PASSWORD=MyPassword;Port = 3306;Option=3;"

It just wont connect raising the error

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified

I am doing it all in a aspx.vb file so I dont know if thats what the problem is. I am also using the odbcconnection object.

Anyone know what I am doing wrong? :(:(

Paul
 
http://connectionstrings.com/ is a good resource

It says:
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

or the MS version of OLEDB should also work with:
Provider=MySQLProv;Data Source=mydb;User Id=myUsername;Password=myPassword; and System.Data.OleDb.OleDbConnection
 
Thanks for your help.

I have tried both of these but I dont think I understand what I should be putting in the "provider=" bit.

My string at the mo is
"Provider=64.71.229.253;Data Source=Bodwad_Master;User Id=Bodwad_Bodwad;Password=password;"

The more I try to understand that website the more my brain huts ?(

Thanks
 
no provider is what it says, that tells the OS which driver to load, so it needs to be MySQLProv
 
hmmm but if I try that I get

The 'MySQLProv' provider is not registered on the local machine

which means its not installed. I have tried using the .net MySqlConnector aswell and this isnt installed either :eek:(

Do I need to do something in the web.config file?

Sorry if these are simple things, its all odd to me :(
 
You can load one of the connectors in your /bin as well the MySQL.DATA.dll is the connector :)
 
ahhh I didnt realise we could create a bin file on the server and copy Dll's into it. Now I have copied the dll in it works great. Thankyou for your help, I have to say this web malarky is very frustrating, I think I will stick to VB and c++ :p
 
Back
Top