Retrieve data from MYSQL using VB.NET

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jun 2009
Posts: 5
Reputation: cee_karthi is an unknown quantity at this point 
Solved Threads: 0
cee_karthi cee_karthi is offline Offline
Newbie Poster

Retrieve data from MYSQL using VB.NET

 
0
  #1
Jul 18th, 2009
Hi ALL,

Plz tell me how to retrieve data from mysql using vb.net as frontend.
I created database in mysql and able to insert data from vb.net but i dont know how to retrieve data from mysql. Plz help me to perform this action. Plz post your reply for my question....


Regards,
Karthikeyan.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,612
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 463
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven

Re: Retrieve data from MYSQL using VB.NET

 
0
  #2
Jul 18th, 2009
cee_karthi,
Which database product are using MYSQL or MSSQL? Post code if you have. Your source must be surrounded with bb code tags.

[code=vb.net]
.. statements..
[/code]
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 5
Reputation: cee_karthi is an unknown quantity at this point 
Solved Threads: 0
cee_karthi cee_karthi is offline Offline
Newbie Poster

Re: Retrieve data from MYSQL using VB.NET

 
0
  #3
Jul 18th, 2009
Originally Posted by adatapost View Post
cee_karthi,
Which database product are using MYSQL or MSSQL? Post code if you have. Your source must be surrounded with bb code tags.

[code=vb.net]
.. statements..
[/code]

Im using MYSQL. I indicated correctly in the first thread itself.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,612
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 463
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven

Re: Retrieve data from MYSQL using VB.NET

 
0
  #4
Jul 18th, 2009
Show us your code work.
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 169
Reputation: tuse is an unknown quantity at this point 
Solved Threads: 14
tuse's Avatar
tuse tuse is offline Offline
Junior Poster

Re: Retrieve data from MYSQL using VB.NET

 
0
  #5
Jul 18th, 2009
Check my blog post- http://dotnet.tekyt.info/?p=27

If you still have any doubts, feel free to ask
My blog on .NET- http://dotnet.tekyt.info
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 105
Reputation: Piya27 is an unknown quantity at this point 
Solved Threads: 8
Piya27's Avatar
Piya27 Piya27 is offline Offline
Junior Poster

Re: Retrieve data from MYSQL using VB.NET

 
0
  #6
Jul 18th, 2009
Use SqlDataReader
and then ExecuteReader
Regards,
Piya:)
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 105
Reputation: Piya27 is an unknown quantity at this point 
Solved Threads: 8
Piya27's Avatar
Piya27 Piya27 is offline Offline
Junior Poster

Re: Retrieve data from MYSQL using VB.NET

 
0
  #7
Jul 20th, 2009
hi cee_karthi,
if you hv been able to solved your problem..then please mark this thread as solved...
Regards,
Piya:)
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 1
Reputation: acidcool is an unknown quantity at this point 
Solved Threads: 0
acidcool acidcool is offline Offline
Newbie Poster

Re: Retrieve data from MYSQL using VB.NET

 
-1
  #8
Sep 11th, 2009
Originally Posted by cee_karthi View Post
Hi ALL,

Plz tell me how to retrieve data from mysql using vb.net as frontend.
I created database in mysql and able to insert data from vb.net but i dont know how to retrieve data from mysql. Plz help me to perform this action. Plz post your reply for my question....


Regards,
Karthikeyan.

Hey cee_kathi,

Have u solved your problem in retriving data.. By the way i have my code here check it out:

Imports MySql.Data.MySqlClient
Imports System.Data
Public Class Form1
'Write your own Database code in VB .NET Tutorial using MySQL
'The Connection Object
'Dim objConn As MySqlConnection
'Dim objDataAdapter As MySqlDataAdapter
'Dim objDataset As DataSet

Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoad.Click
Dim objConn As MySqlConnection
Dim objDataset As New DataSet
Dim objDataAdapter As MySqlDataAdapter
Dim sqlConn As String

objConn = New MySqlConnection("server=localhost;userid=root;password=password;database=mydatabase")

objConn.Open()
sqlConn = "select * from movie"
objDataAdapter = New MySqlDataAdapter(sqlConn, objConn)
objDataAdapter.Fill(objDataset, "tblMovie")

MsgBox("The Connection is Now 'OPEN'")

objConn.Close()
MsgBox("The Connection is Now 'CLOSE'")

txtTitle.Text = objDataset.Tables("tblMovie").Rows(1).Item(1)
txtYear.Text = objDataset.Tables("tblMovie").Rows(1).Item(2)

End Sub

this is my references...
http://www.homeandlearn.co.uk/NET/nets12p5.html

hope this one would help you.

By the way can you help me can you give your source code for add data in mysql database.

Thnx..

Carl
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC