Results 1 to 3 of 3
  1. #1

    Using ADO plug-in to insert records into db

    I want to insert records into a database using the ADO plugin.

    I've got as far as:

    Set AConnection = ADO.CreateConnection
    Set RecSet = ADO.CreateRecordSet

    AConnection.ConnectionString =

    which appears to work (i.e. connects to the database) but I can't figure out what to do to insert a record into a table. It must be simple
    to do so any clues would be welcome.

  2. #2

    Re: Using ADO plug-in to insert records into db

    To answer my own question (I knew it had to be simple)

    Set Cmd = ADO.CreateCommand
    Cmd.ActiveConnection = AConnection
    Cmd.CommandText = "INSERT into TableName (Col1,
    Col2, ... ) VALUES (Val1, Val2, ... )"
    Cmd.CommandType = cmdText

    (I guess the documentation could be more usefull).

  3. #3

    Re: Using ADO plug-in to insert records into db


    You can add a new record using the AddNew method of the Recordset object.
    For the details on the AddNew method, please see the following Web page:

    Bobby Edgar
    Save on AutomatedQA Products



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 07:40 PM.

Copyright BetaSoft Inc.