Web Page Design and Hosting

January 31, 2007

Next intRowElseIf txtSearchLName.Text And txtSearchCompany.Text Then if

Filed under: professional development with web apis — webmaster @ 5:24 am

Next intRowElseIf txtSearchLName.Text <> And txtSearchCompany.Text <> Then if both last name and company were specified as search criteria loop through dataset looking for matching companyFor intRow = 0 To contactDS.Tables( Contacts ).Rows.Count - 1If contactDS.Tables( Contacts ).Rows(intRow)( Company ) = _ txtSearchCompany.Text And _ contactDS.Tables( Contacts ).Rows(intRow)( LastName ) = _ txtSearchLName.Text Then a match was found so go to the recordintCurRecord = intRowPopulateControlsOnForm() End IfNext intRowEnd IfExit Subhandleerror: MsgBox( An error occured in btnSearchClick_Click: & Err.Number & - & _ Err.Description) Exit SubEnd Sub22.Add the following UpdateDatabaseChangesprocedure to the form. This procedure is respon- sible for querying the local dataset for records that were modified and then updating the Accessdatabase with those changes. Sub UpdateDatabaseChanges() On Error GoTo handleerror Create temporary DataSet. Dim tempDataSet As DataSet Get the changes for each modified row. tempDataSet = contactDS.GetChanges(DataRowState.Modified) Open the connection to the Access databaseConn.Open() Update the Access database with the DataAdapter used to create the datasetcontactDA.Update(tempDataSet, Contacts ) close the connectionConn.Close() Exit Subhandleerror: 248Chapter

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Adult Web Hosting services

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.

Powered by Java Web Hosting