Student/Developer NEW to MySQL and VB.NET seeking help desperately on connectivity and querries
Posted by: Sourjya Sen
Date: November 06, 2004 02:37PM

Hi,
This question has probably been posted a thousand times- but still all my searches have eluded me so far. I'm a student working on developing a school managament and evaluation system. I've been familiarizing myself with MySQL over the past few months and have mastered it quite a bit. The server's on a Mandrake Linux platform and the workstations run on Win2K. I'd managed to communicate between MySQL and VB6 without a hitch using the MySQL ODBC Driver 3.51 - but now my employer wants to all the workstation clients to .NET. I've spent numerous sleepless and to-the-point-of-tearing-off-all-my-hair nights trying to get VB.NET connect to the db and execute the queries successfully. Sorry to say all my programming skills have given out on me.
Could anyone please show me an example of a basic connection using the .NET connectivity package (MySql.Data.MySqlClient) and a few querries (SELECT, INSERT) etc. The code should be in VB.NET only.
My main problem - I've connected to the database and make querries but am unable to figure out the syntax to parse data from the db. What I'm looking for is specific examples on say how to execute a query using the MySqlCommand.ExecuteReader and use the querried data to fill up my text fields. I'm able to get data for only the first column in a row using ExecuteScalar, but ExecuteReader completely baffles me. All the methods of ExecuteReader except GetName fetches me no values.
Any help in this regard will earn my eternal gratitude ;)
Thanks
P.S. I've all the connectivity packages installed.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.