Rs. CursorLocation=adUseClient
Rs. The Open SQL, conn, 1, 2
The Set DataGrid1.
the DataSource=rsDataGrid1. Refresh
DataGrid1. Visible=True
A=MsgBox (" determine to buy?" , 35, "confirmed")
If a=vbYes Then
If the rs! The remaining votes & lt; 1 Then
MsgBox "the ticket has been sold out
"The Else
SQL="select * from purchase"
R.O pen SQL, conn, 1, 2
Of state Richard armitage ddNew
r! Tno=rs! Train no.
r! Dtime=rs! Departure date
Rs! The remaining votes=rs! The remaining votes - 1
Rs. Update
r! Seat=rs! Seat number - rs! The remaining votes
R.U pdate
End the If
End the If
Rs, lack of update key column information update, what's the matter, look up for a long time all don't know
CodePudding user response:
Try the rs! LastTicket=rs! LastTicket - 1CodePudding user response:
I can't, I tried before