Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

VB/SQL/Access2007

  • 10-09-2008 09:18AM
    #1
    Closed Accounts Posts: 7


    Hi All,
    New to Access2007 and have a quick question regarding the Attachment datatype.

    I have a VB6 programme to connect to a database, and to do the usual, SELECT, INSERT INTO, UPDATE etc., I create a Connection object and
    execute SQL against it.

    Can anyone tell me if and how I can write an SQL statement to Insert a file to an Attachment field in the database table? I've looked on the web but cannot find anything about programmatically inserting from VB to specify a file/attachment?
    As in sSQL = "INSERT INTO myTable VALUES('name', 'address' ... picturefile)

    There were some resources on doing it from VBA and DoCmd. but I want to keep the application and database seperate.

    Thanks in advance.


Comments

Advertisement