|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (7 bit)
|
MySQL and Visual Studio.NET
Does anyone know how to connect to a MySQL database through Visual Studio.NET?
I have a database I created in MySQL, and I am just trying to create a simple form where users can log in, type in data, and view reports. I tried connecting through an ODBC driver, but it didn't work. I was able to see the tables through Data Connections in the Server explorer window, but when I try to drag and drop the table into the form, I get "You cannont use OLE DB provider for ODBC drivers" error. I researched this error, downloaded the ODBC.NET add-in, and added the dll file in my references but I still get the same error! Please note that the tutorials on the Microsoft sight included some coding that went way above my head. I managed what I could, and was able to successfully compile the additional ODBCConnection strings, but when I tried to load data into a data set I got an error concerning my server name. I tried using both "localhost" and "dell" (my computer's network name) but nothing. I also tried to play around with the servers, but nothing shows up. It looks like the MySQL server is running. It is in my processes list as mysqld-nt.exe as a System service, but it looks like MySQL is not picking it up. Also, I used both Interbase and MS-SQL, and both of these had SQL Server Managers that could start and stop the SQL Server and were successfully loaded into the Visual Studio.NET database server. Is their another MySQL program I need to run, such as the client program, or something I'm missing? |
|
|
|
|
|
#2 |
|
Member (7 bit)
|
Okay, I think I know where I went wrong. I have to setup the ODBC driver as a system DNS. I had it setup as a User DNS.
I am new to all of this, and this might sound dumb, but am I'm going to have to setup the ODBC driver on each of the client computers I install this on? Do I program this into the setup installation program, as well as the MySQL client? I saw something about using references in the code to make the application scalable, but I haven't gotten this far and don't know if I have to do this for ODBC drivers. I saw smaller stuff, like using %system root% instead of C: to access files in case the hard drive is labled D: I dropped a grand on Visual Studio.NET, but so far, I haven't seen any functional difference between what I am doing now, and just linking the MySQL database through the System DNS, making my forms and reports, and exporting it as an executable. I'm worried if I paid this money for the pretty box and the Microsoft brand name ! Are their any guides that show, in real world practical functionality, what Visual Studio.NET has to offer over programing in Access? Thanks!!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|