create a table with fields etc?

erwint

New member
Joined
May 10, 2011
Messages
1
Programming Experience
Beginner
Hi, I am extremely new on VB.net. Just installed Visual Studio 2010 and I am not sure if I have to post here or in Visual Studio.net....

I am good at vb 6.0 but that is old so up to the new stuff.

1. I have a website and created a MySQL database but I can not "get in" the database to make a table or do something else; how do I create a table with fields etc?

2. I want to make a table with 2 fields: firstname and lastname and a application that can read all the records from that databas and put it in a listview. Can somebody give me that code so I can start with that or maybe somebody knows where I can download such a small program?

Appreciate any help very much!
Thanks in advance!

Erwin
 
You need to learn the ado.net basics -

Connection - Open a connection to your mysql database - Check out connectionstrings.com if you are having trouble figuring that part out.
Command - Pass your connection and command text (CREATE TABLE ...)
Command.ExecuteNonQuery to run a CREATE TABLE command.
Command.ExexuteReader if you were running a result set that you wanted to loop through

You may also want to learn the basics of Datasets/DataTables/DataRows if you plan to work with databases in .NET as well.
 
Back
Top