Question get specific value

namkn

New member
Joined
Mar 27, 2011
Messages
2
Programming Experience
Beginner
Hi i'm a newbie to VB.NET and MySQL working all together. I was able to connect the database via VB Datasource/dataset. However, how do you get a specific value out from the database?

for example:
SELECT custName, custAddress,CustCity, InvNumber FROM Invoices INNER JOIN Customers ON Customers.InvoiceID = Invoices.InvID where Customers.custState = 'CA' ORDER BY custName

how do i go about getting all the data that's being returned?

Thanks ...
 
There are two ways that you can go about this. The fastest way to run through a dataset is using the Connection, DataReader, and Command objects (the other is dataset/data adapter). For MySQL I believe they may have their own connection package or use ODBC, but you may want to verify that. But if you open a connection to the target database, pass that connection and your command text to a command object and then use the command to execute reader which will fill a datareader object which you can loop through and the datareader is a collection of tuples in the result set.
 
There are two ways that you can go about this. The fastest way to run through a dataset is using the Connection, DataReader, and Command objects (the other is dataset/data adapter). For MySQL I believe they may have their own connection package or use ODBC, but you may want to verify that. But if you open a connection to the target database, pass that connection and your command text to a command object and then use the command to execute reader which will fill a datareader object which you can loop through and the datareader is a collection of tuples in the result set.

Thanks, i'll try to research on the ways you mentioned.. :)
 
Back
Top