Results 1 to 3 of 3

Thread: INSERT INTO

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Location
    Greenville, NC, USA
    Posts
    15

    Post

    Does anyone know how to use the INSERT INTO statement with ADO to inset records into a seperate datbase?

  2. #2
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657
    I know that Access/DAO supports this SQL syntax:
    INSERT INTO TableName IN OtherDB VALUES(whatever)
    For example, you could say:
    dbOne.Execute "INSERT INTO MyTable IN 'C:\MyDB2.MDB' VALUES('A', 1, 'B')"
    I don't know if the DB you are using supports the IN clause in the INSERT statement (and in ADO, the Execute method is on the connection, not the DB, right?). Good luck.

  3. #3
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Post Normal INSERT INTO Statement

    Just use the normal insert into statement that enough already.

    Let assume your database is save at C:\MyDb with filename Database2.mdb. Inside this database you have a table name TblMyTable that consits of three fields that store TEXT datatype and the INSERT INTO statement just look like below:

    Code:
    INSERT INTO [C:\MyDb\Database2.mdb].[TblMyTable] VALUES ('Data1', 'Data2', 'Data3');



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width