VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Shows how to fabricate a recordset, adding new fields to recordset structure and inserting a row in

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.

Rate Shows how to fabricate a recordset, adding new fields to recordset structure and inserting a row in



    
    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


Download this snippet    Add to My Saved Code

Shows how to fabricate a recordset, adding new fields to recordset structure and inserting a row in Comments

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.

Post your comment

Subject:
Message:
0/1000 characters