|
-
Mar 13th, 2004, 01:49 AM
#1
Thread Starter
Member
connect to mySQL with VB.Net
hi all
i'm trying to connect a mySQL server (not on my local machine) from VB.Net using OLEDB Connection.
the connection string used is :
Code:
Provider=MySQLProv;Data Source=mySQLDB;User Id=myusername;password=mypassword;"
the error my prog shows is "MySQLProv not supported by local machine."
do i have to download it explicitly ??? i dont have to use ODBC at all. plz help
-
Mar 13th, 2004, 04:07 AM
#2
Thread Starter
Member
ok...i've downloaded the OLEDB3.0 and have installed it too.
now when i run, it asks for the data Source name....is this the DSN or the server name ?? i've provided the default..it shows the error : No error information available:E_FAIL(0x80004005)
plz help me n lemme know what am i doing wrong
-
Mar 13th, 2004, 07:59 AM
#3
Frenzied Member
Here's a quick link, hope it helps.
-
Mar 13th, 2004, 09:08 AM
#4
Sleep mode
-
Mar 14th, 2004, 05:31 AM
#5
Thread Starter
Member
hi...well i know the connection string and everything.
the problem i'm facing is that when i give the details..a dialog box appears when the application starts which requires the database name details. as my database is not on the local machine, i have given the location in the connection string but i on connecting i get the error : No error information available.
Do i have to make a DSN...i dont want to...can u guys help me here
the conn string i use is :
Code:
Provider=MySQLProv;Location=IP Address;Data Source:mydatabase;Username=uid;Password=pwd
-
Mar 15th, 2004, 01:18 AM
#6
Thread Starter
Member
please ppl i need ur help here.....what am i doing wrong ???
my setup is as follows:
i've downloaded and installed myOLEDB3 and have registered myProv.dll
the connection string i'm using is:
Code:
Dim SQLConn As New OleDbConnection()
strSQLConn = "Provider=MySQLProv;Location=IPAddress where the mySQL database is;Data Source=database_name;User Id=uid;Password=pwd"
SQLConn.ConnectionString = strSQLConn
SQLConn.Open()
the connection doesn't open...when i run the prog, i get a kind of dialog box which is for the data source name details, it has a column ofr datasource name which has default written in it, the other columnsa are filled with the details i gave. when i click on connect on that dialog box, the error i get is:
Code:
No error information available:E_FAIL(0x80004005)
c'mon ppl help me out here
-
Mar 15th, 2004, 02:48 AM
#7
Thread Starter
Member
ok..i had to make a DSN to get it work....the connection is working and i'm able to do what i wanna.
now my second question is..is there a way i can make the DSN on the fly..i mean the user wont have to explicitly make it...the vb.net code makes it for him. he just have to provide the server name, the usre id, password, dsn name and the database(thru an interface)
waiting for ur replies...but remember in vb.net
Last edited by amNewatVB; Mar 15th, 2004 at 02:53 AM.
-
Apr 14th, 2004, 12:18 AM
#8
Hyperactive Member
i'm trying to do it now, but can't get past point 1.
question: "where do i download/install the MySQLProv Providor from?"
reason is, that i'm getting this error:
An unhandled exception of type 'System.InvalidOperationException' occurred in system.data.dll
Additional information: The 'MySQLProv' provider is not registered on the local machine.
"The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.
Windows & Web Developer
Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
Sutherland Shire, Sydney Australia
www.stingrae.com.au
Developer of Arnold - Gym & Martial Arts Database Management System
www.gymdatabase.com.au
-
Apr 14th, 2004, 01:06 AM
#9
Hyperactive Member
Ok, I just got the providor. Now how do I create a DSN?
"The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.
Windows & Web Developer
Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
Sutherland Shire, Sydney Australia
www.stingrae.com.au
Developer of Arnold - Gym & Martial Arts Database Management System
www.gymdatabase.com.au
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|