hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Programming Tutorials : mySQL & VB.net
Reply

Programming Tutorials How-Tos related to programming, databases, and the like.
Forum Jump

mySQL & VB.net

Reply Post New Thread In Programming Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 07-21-2004, 03:30 PM
revosoft revosoft is offline
Disabled
 
Join Date: Jul 2004
Posts: 3

mySQL & VB.net


How can i connect to a mySQL database using a Visual Basic .Net program and is it a good idea for a easy to use client database?

Reply With Quote


Sponsored Links
  #2  
Old 07-28-2004, 07:58 AM
MaJiD SaeeD Khan MaJiD SaeeD Khan is offline
Newbie
 
Join Date: Jun 2004
Location: Islamabad
Posts: 8
Post .net Connection with MySQL - Majid Saeed Khan.

There are so many methods to connect to MySQL from .net environment. If you ask for an easy way out then i refer you blueshell Active Tables.

http://www.pcworlddownload.com/devel...ive-Tables.htm


But if you are a good programmer and you really want to do it on your own way, then there are three ways to connect to MySQL as mentioned by MySQL themselves.

- The ODBC.NET Solution - MyODBC Driver
- Using MySQL Native .NET Providers
- Using the OLEDB.NET Solution - MyOLDDB Provider

http://dev.mysql.com/tech-resources/articles/dotnet/


I hope this will help you, but if you still need some guidance.. just let me know.

Reply With Quote
  #3  
Old 08-16-2004, 05:21 AM
SEATi SEATi is offline
Web Hosting Master
 
Join Date: Jul 2003
Posts: 656
I would suggest using the MyODBC driver, as it handles connections better (at least that's what I think).

Reply With Quote
Sponsored Links
  #4  
Old 06-24-2005, 05:00 PM
EngLee EngLee is offline
New Member
 
Join Date: Jun 2005
Posts: 0
I agree with him. Here's what I did to connect...

lifeasprogrammer.blogspot.com/2005/06/visual-basic-net-and-mysql-connection.html

Reply With Quote
  #5  
Old 06-26-2005, 11:16 PM
Ricardob Ricardob is offline
Junior Guru Wannabe
 
Join Date: Oct 2004
Location: Canada
Posts: 61
I haven't tried to connect to mysql from a .net application, but pretty much your options are:

Basically ado.net gives you 3 ways to connect to datasources.

1) using an odbc provider, .net provides wrapper classes for odbc providers, if you have the mysql odbc driver installed, these classes should recognize. This method is NOT recommended by Microsoft since it's a lot slower and may present a security threat.

2) using a generic oledb provider, because mysql is oledb compatible it should work, but you will have to find out what the connection string should be (probably on the mysql site).

3) Using a specific provider. Microsoft provides specific providers for SQL Server and Oracle. Oracle slaso has its own data provider for .net, it's possible that MySql or someone else has developed an specific provider that would be more efficient than generic ones.


The nice thing is that whatever method you choose, the data access classes are pretty much the same, same properties, same methods, they all have datareader, command, datadapter, etc. There might be some methods that are only available to specific providers (mostly more database specific) but for general tasks the logic is the same. A component that access a SQL Server database can access a Mysql one just changing the connection strings (providing you are using the generic oledb provider), even if you are using an specific provider, you only need to change the names of some classes and recompile.

Of course this has its limitations and you should be aware of what the database can do and what it can't do, and also be familiar with the specific syntax for certain things, for example, the sql language is pretty much standard for all databases, but if you use parameters, and/or stored procedures, or triggers, then the syntax can be very different.

Reply With Quote
  #6  
Old 06-26-2005, 11:40 PM
SEATi SEATi is offline
Web Hosting Master
 
Join Date: Jul 2003
Posts: 656
It's been almost a year since the original thread was started, is it really worth it to bring it alive again?

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Web Host Rackspace Launches Private Beta for MySQL Cloud Database Web Hosting News 2011-12-01 21:09:51
Parallels Now Offering Licenses for CloudLinux OS Web Hosting News 2011-10-26 17:29:25
Web Hosting Sales and Promos Roundup - October 7, 2011 Web Hosting News 2011-10-07 19:56:18
Web Hosting Software Firm CloudLinux Releases CloudLinux OS Version 6.1 Web Hosting News 2011-09-13 14:08:49
Web Host FireHost Partners with Cloud Security Firm Gazzang for Data Encryption Web Hosting News 2011-08-16 20:33:43


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?