by Ali Massoudi (1 Submission)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 20th February 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Shows how to fabricate a recordset, adding new fields to recordset structure and inserting a row in the table.
Dim rsResult As ADODB.Recordset
Set rsResult = New ADODB.Recordset
rsResult.CursorLocation = adUseClient
rsResult.Fields.Append "EMPLOYEE_ID", adSingle
rsResult.Fields.Append "EMPLOYEE_FIRSTNAME", adVarChar, 30
rsResult.Fields.Append "EMPLOYEE_LASTNAME", adVarChar, 30
rsResult.Open
With rsResult
.AddNew
.Fields("EMPLOYEE_ID") = "1234"
.Fields("EMPLOYEE_FIRSTNAME") = "John"
.Fields("EMPLOYEE_LASTNAME") = "Bronson"
.Update
End With
rsResult.Close
Set rsResult = Nothing
End Sub
No comments have been posted about Shows how to fabricate a recordset, adding new fields to recordset structure and inserting a row in. Why not be the first to post a comment about Shows how to fabricate a recordset, adding new fields to recordset structure and inserting a row in.