Programming, website development forum Get latest updates by RSS Follow TechnicalTalk on Twitter Follow TechnicalTalk on Facebook 
HomeSearchRecent PostsLoginRegisterContact Us

Username  
Password    
  Forgot your password?  

Pages: [1]   Go Down
 
  Email this topic  |  Print
0 Members and 1 Guest are viewing this topic.

Connecting Vb.net with Mysql database ?

 
webmaster forum
Mayee  Offline
Activity
0%
 
New Coder
Posts: 25
Topics: 15
January 21, 2009, 11:00:37 AM

Hi Everybody,
I have a doubt here that whether how to connect mysql database, which is from Vb.net 2005. What are the other operating systems which supports ms.net ?
Thanks.
 
webmaster forum
singam  Offline
Activity
0%
 
Regular Coder
Posts: 50
Topics: 19
June 21, 2010, 02:44:24 AM

Step# 1:
Create MySQL Databse with cPanel and phpMyAdmin
go here & you'll find the easy way to do this ( hxxp: teamtutorials. com/web-development-tutorials/create-mysql-databse-with-cpanel-and-phpmyadmin )

Step# 2:
How to Access a MySQL Database Using PHP
go here & you'll find the easy way to do this ( hxxp: teamtutorials. com/web-development-tutorials/how-to-access-a-mysql-database-using-php )

Step# 3:
Inserting Data Into a Mysore Database using PHP
go here & you'll find the easy way to do this ( hxxp: teamtutorials. com/web-development-tutorials/php-tutorials/inserting-data-into-a-mysql-database-using-php )
===================

Teeth Whitening Glasgow |  Tooth Whitening Glasgow 
 
webmaster forum
Shan  Offline
Activity
0%
 
New Poster
Posts: 2
Topics: 0
July 05, 2010, 05:19:18 AM

MYSQL with C#
string connectionString = "server=servername;database=databasename;uid=databaseusername;pwd=databasepassword";
SqlConnection mySqlConnection = new SqlConnection(connectionString);

string selectString = "SELECT field1,field2,field3 " + "FROM tablename ";

SqlCommand mySqlCommand = mySqlConnection. CreateCommand();

mySqlCommand. CommandText = selectString;

SqlDataAdapter mySqlDataAdapter = new SqlDataAdapter();

mySqlDataAdapter. SelectCommand = mySqlCommand;

DataSet myDataSet = new DataSet();

mySqlConnection. Open();

//retriving rows from the table
string dataTableName = "Tablename";
mySqlDataAdapter. Fill(myDataSet, dataTableName);

DataTable myDataTable = myDataSet. Tables[dataTableName];

foreach (DataRow myDataRow in myDataTable. Rows)
{
Console. WriteLine("Field1 = " + myDataRow["field01"]);
Console. WriteLine("Field2 = " + myDataRow["field02"]);
Console. WriteLine("Field3 = " + myDataRow["field03"]);
}

mySqlConnection. Close();

 
webmaster forum
Admin  Offline
*
 
Code Guru
Location: India
Gender: Male
Posts: 1387
Topics: 105
NaviBuster NaviBuster
WWW
July 14, 2010, 02:24:54 AM

@anuproy: Good code anup. Thnaks for posting it on the thread.
 
webmaster forum
msdnguide  Offline
Activity
0%
 
New Coder
Posts: 19
Topics: 1
WWW
May 27, 2011, 04:56:35 AM

Please see this link to know how to do it VB.NET-MySQL-Connection

Visual Studio
 
  Email this topic  |  Print
Pages: [1]   Go Up
 
Jump to:  



Powered by SMF 1.1.15 | SMF © 2011, Simple Machines


Google visited last this page February 06, 2012, 09:57:46 AM