eltincho2202
Member
- Joined
- Jul 26, 2010
- Messages
- 8
- Programming Experience
- 1-3
I would like to know how can I get specific data with mysql and vb.net
What I want to do is this:
I have a class... lets call it Animal. In my MySQL database I have one table called animal with some fields. Each field is an attribute of the Animal class.
What I want to do is to execute a SQL like "select * from animal" and set all de data in the specific attributes, for example:
table animal:
animalid integer
animalname varchar(100)
animaltype varchar(100)
Dim myAnimal as New Animal()
myAnimal.Id = animalid
myAnimal.Name = animalname
myAnimal.Type = animaltype
I want to create a function that returns me the myAnimal object.
How can I set those values to my Animal object?
What I want to do is this:
I have a class... lets call it Animal. In my MySQL database I have one table called animal with some fields. Each field is an attribute of the Animal class.
What I want to do is to execute a SQL like "select * from animal" and set all de data in the specific attributes, for example:
table animal:
animalid integer
animalname varchar(100)
animaltype varchar(100)
Dim myAnimal as New Animal()
myAnimal.Id = animalid
myAnimal.Name = animalname
myAnimal.Type = animaltype
I want to create a function that returns me the myAnimal object.
How can I set those values to my Animal object?