Hi,
To increment the id_Student column all you needed to do was define the column as the primary key with auto increment. Assuming the id_Student is an integer data type the declaration would have been:
create table some_table(
id_Student int not null primary key auto_increment,
....)
Now whenever new data is inserted you don't include a value for the id_Student, mySQL will increment it automatically. You can alter the increment rate if the default of 1 isn't what you need.
As for searching and displaying data from a database you'd be better off looking for a tutorial online to show you how to do that. There are many to choose from.
hericles
Veteran Poster
1,065 posts since Nov 2007
Reputation Points: 156
Solved Threads: 228
Skill Endorsements: 9
You can get rid of the has rows, and try:
If myData IsNot Nothing Then
Do While myData.Read
'Place your code here.
'Use GetValue instead of .toString
Loop
Else
MsgBox("Empty Reader")
End IF
Begginnerdev
Practically a Posting Shark
864 posts since Apr 2010
Reputation Points: 184
Solved Threads: 142
Skill Endorsements: 8
You will have to close this thread and start a new one. I am sure we will be able to help you out.
Begginnerdev
Practically a Posting Shark
864 posts since Apr 2010
Reputation Points: 184
Solved Threads: 142
Skill Endorsements: 8
Question Answered as of 1 Year Ago by
Begginnerdev
and
hericles