0001
0002
0003
etc
(thats how theyre formated in access)
but the text box only shows 3 instead of 0003
i tried changing the format to 1000 so it went up like this
1001
1002
1003
still the text box only showed 3, what is going wrong?, thanks in advance
here is my code
- Code: Select all
provider4 = "PROVIDER=Microsoft.Jet.OLEDB.4.0;" 'database provider established
dbcustomer = "data Source = ..\..\Booking.mdb"
customerconnection.ConnectionString = provider4 & dbcustomer 'connect the database and the database provider
Bookingconnection.Open()
SqlQuery4 = "SELECT * FROM Customer WHERE CustomerID = (SELECT MAX(CustomerID) FROM Customer) "
dacustomer = New OleDb.OleDbDataAdapter(SqlQuery4, customerconnection) 'and puts the info into database provider
dacustomer.Fill(dscustomer, "Customer") 'puts the copied information into the dataset
Bookingconnection.Close()
NumberofRows4 = dscustomer.Tables("Customer").Rows.Count
TxtCID.Text = dscustomer.Tables("Customer").Rows(NumberRow4).Item(0)


