Hi, I am using VB6 and phpMyAdmin connected by WAMPServer for my system.
I am new in this language. Here's the code in my that seems to be wrong:
Private Sub cmdsubmit_Click()
Dim rs As ADODB.Recordset
Dim strsql As String
strsql = "insert into table1 ( surname, firstname, middlename, house, street, village, brgy, city, gender, kind, birthday) values (" _
& "'" & txtsurname.Text & "'," _
& "'" & txtfirstname.Text & "'," _
& "'" & txtmiddlename.Text & "'," _
& "'" & txthouse.Text & "'," _
& "'" & txtstreet.Text & "'," _
& "'" & txtvillage.Text & "'," _
& "'" & txtbrgy.Text & "'," _
& "'" & txtcity.Text & "'," _
& "'" & combogender.Text & "'," _
& "'" & combokind.Text & "'," _
& "'" & DTPicker2.Value & "')"
Set rs = cn.Execute(strsql)
Set rs = Nothing
I have ID as the primary key from table1, and it is autoincremented.
I also have a form wherein I use filllistview to view all of these.
My problem is that everytime I enter a new data and look at it in the database or in the listview, another data with the next assigned ID number gets automatically inserted right after it with all the other fields as blank.
Can someone help me with this? D: