Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

VB/SQL/Access2007

  • 10-09-2008 10: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