Dim rs As New ADODB. You
Private Sub Command1_Click ()
Dim SSQL As String
Set the rs=New ADODB. You
Adodc12. The ConnectionString="Provider=Microsoft. Jet. The OLEDB. 4.0; Data Source=G: electronic \ \ centec VB study \ database12 MDB. Persist Security Info=False "
SSQL="select * from student where student id='" & amp; Text1. Text & amp; "'
"
Rs. CursorLocation=adUseClient
Rs. The Open SSQL Adodc12, adOpenKeyset, adLockReadOnly
The Set MSHFlexGrid1. The DataSource=Nothing
The Set MSHFlexGrid1.
the DataSource=rs
End Sub
CodePudding user response:
After the operation, prompt the parameter type is wrong, can't find the problemCodePudding user response:
Private Sub Command1_Click ()
Dim SSQL As String
The Set MSHFlexGrid1. The DataSource=Nothing
SSQL="select * from student where student id='" & amp; Text1. Text & amp; "'
"Adodc12. The ConnectionString="Provider=Microsoft. Jet. The OLEDB. 4.0; Data Source=G: electronic \ \ centec VB study \ database12 MDB. Persist Security Info=False "
Adodc12. RecordSource SSQL=
Adodc12. Refresh
The Set MSHFlexGrid1. The DataSource=Adodc12
End Sub
CodePudding user response:
Could not find the ISAM can be installed to runCodePudding user response:
In design mode by setting the first control properties binding success,Through statements come again to dynamic binding set way,
CodePudding user response:
Don't know how to operate, control properties binding didn't find what's the problemCodePudding user response:
The Adodc12, add again after deleting MSHFlexGrid1, binding set control properties,Then add again after deletion, dynamic binding set way,
CodePudding user response:
The absent-minded, let you guess?CodePudding user response:
@ tiger_zhao thank you, have been done, the database connection more SpacesCodePudding user response:
The total score is not enough, can not stick