Home > Software engineering >  Rs. Update the lack of update key column information
Rs. Update the lack of update key column information

Time:09-24

SQL="select" Train ". Tno as trains, Dtime as departure date, Cnum as seat number, LastTicket as the rest of the votes from [Ticket], [Train] where Ticket. Tno="Train", tno and Ticket. Tno='" & amp; Text1. Text & amp; "' and Fsta=" & amp; Text2. Text & amp; "' and Lsta=" & amp; Text3. Text & amp; "' and Dtime=#" & amp; Calendar1. Value & amp; "#", "
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 - 1

CodePudding user response:

I can't, I tried before
  • Related