02-04-05, 04:20 #1Registered User
- Join Date
- Feb 2005
i used microsoft data grid control 6.0(oled) and i allowed user to modified the contain inside by just making modification inside the grid. however, y will it update itself everytime i click on the close at the title bar? note that i do not click on the update button although i did some modification inside. how to prevent it to automatically update itself whenever i click on the close at title bar?
i connected sql server 2000 through the ado control inside the component under project menu bar and it said connection successfully establish. however, i wasn't using the adcmdtable at the record source but using adcmdUnknown and write sql to join table(i named my ado control as adoGuardian).i did my sql from sql server 2000 at view.
below is my sql commandadoGuardian)
SELECT Applicant.AppNRIC, Applicant.AppName, Guardian.GNRIC,
GuardianReferee.RName, Guardian.GAge, GuardianReferee.RHomeAdd,
Guardian.EmpType, Guardian.EmpBusName, Guardian.EmpBusAdd,
FROM GuardianReferee INNER JOIN
Guardian ON dbo.GuardianReferee.RNRIC = Guardian.GNRIC INNER JOIN
GuardianReferee.RNRIC = GRRelationType.RNRIC INNER JOIN
Applicant ON GRRelationType.AppNRIC = Applicant.AppNRIC
these are the code behind a search button:
Private Sub cmdSearch_Click()
.Recordset.Find .Recordset!AppNRIC = txtAppNRIC.Text And .Recordset!GNRIC = txtGNRIC.Text
If .Recordset.EOF Then
MsgBox "No matching record found", vbCritical, "No Matching"
'display the value at the text box
txtGName.Text = .Recordset!GName
txtGAge.Text = .Recordset!GAge
txtGAdd.Text = .Recordset!GAdd
when i run the code and and i found that the search button giving no respond. not a dialog box that pop up that informed me the error of the code. so my question is what is the problem with the code?? y can't i run it? or it isn't the code problem and it is the problem of the database?
may i know the meaning of the run-time error below?
run-time error '3021'
Either BOF and EOF is True, or the current record has been deleted. Requested operation requires a current record.
thanks a lot!!! i'm quite new to VB6.0!!!
Last edited by krykino; 02-04-05 at 11:03.