Home > Software engineering >  On the issue of the VB code database, are interested to come in and have a look
On the issue of the VB code database, are interested to come in and have a look

Time:10-14

SQL server database:
Code function: when the credit card success, to achieve the car number in the table 2 (adodc2) for when a credit card from the card read car number of the "name" field is copied to the table 1 (adodc1),
In table 1, for example, a car number, and name two columns, with car number in table 2, item description, unit two columns, when credit card reader read the card corresponding car number for jin A123456, see table 2 car number as the jin A123456 is the value of the copy to the product value, in table 1
Private Sub Timer2_Timer ()
Dim STR As String
St=rf_card (icdev, 0, SNR (0))
If (st=0) Then
St=hex_a (SNR (0), asnr, 4)
The Else
'MsgBox "card, please!" , vbCritical
The Exit Sub
End the If


Sector=1
St=rf_authentication (icdev, 0, sector)
If (st=0) Then
'List1. AddItem (rf_authentication "ok")
The Else
MsgBox "sector 1 validation failed!" , vbCritical
The Exit Sub
End the If
St=rf_read (icdev, 4, data10)
St=rf_read (icdev, 5, data11)
St=rf_read (icdev, 6, data12)
Text9. Text=data10
Text10) Text=data11
Text11. Text=data12
Text12. Text=Trim (Text9. Text) & amp; Trim (Text10. Text) & amp; Trim (Text11. Text)
If (st & lt;> 0) Then
MsgBox "card read failure!" , vbCritical
The Else
St=rf_beep (icdev, 30)
St=rf_halt (icdev)
End If [above all functions for reading card, don't need not see, basically see below, read the card after the car number has been written to text12 text box]
Adodc1. You. ADDNEW
STR="select name from incoming data set where car number='" & amp; Text12. Text & amp; "'
"Adodc2. RecordSource=STR
Adodc1. You. Fields (" number ")=Text12. Text
Adodc1. You. Update
Adodc1. Refresh
End Sub
[error is: the object variables or with variable block is not set]

CodePudding user response:

To see, to do big homework,==

CodePudding user response:

Help you top once, too complex, large skull,

CodePudding user response:

Object variable or variables with block is not set, generally in several ways, first and see which variables are error, check the variables; Second may be your VB installer if there is a problem, restart the installation VB to try again,
  • Related