Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Databases (https://www.askmehelpdesk.com/forumdisplay.php?f=444)
-   -   Can I create records with OLE objects in Access & append to a linked SQLServer table? (https://www.askmehelpdesk.com/showthread.php?t=183133)

  • Feb 11, 2008, 10:05 PM
    ItsOnlyMe
    Can I create records with OLE objects in Access & append to a linked SQLServer table?
    There's a table in our SQL Server Database that stores various notes. There are text fields for the type of notation ( i.e. C = Customer, V=Vendor notes etc) and one for the "Owner_ID" (ie the Customer ID or Vendor ID). There's a date field for the create date of the note and the notes themselves are stored as binary data which appears as OLE object in Access.

    Our sales manager wants to append special pricing notes to a group of customers. There are almost 400 customers and doing this one by one will be mega time consuming. I have copied the structure of the table into Access and have no problem inserting all the necessary fields but I don't know how to insert the pricing text as an OLE object or as binary data.

    I can pull readable information out of the note field using a StrConv function in Access but I don't know how to convert my pricing text to binary or OLE and use an Append Query.

    Can anyone point me in the right direction, please? Either using an Access function or by supplying SQL code ?

    Thanks,
    me
  • Mar 11, 2008, 09:06 PM
    chuckhole
    In SQL Server, you can create a Table View that filters only the records that you want to edit. This will make it safer than having all of the records shown. Then use something like MS Access to connect to your SQL Server View with an ODBC linked table.

    You can then edit the content (permissions allowing) of your data using your additional code with Access.

    If you want some quick reference with SQL Queries, then create a like query in MS Access using the wizards and select the SQL View of your Query. It will not be exactly the same as you would use in SQL Server but it is pretty close. Enough so that you will understand the syntax.

    A basic SQL Server query would be something like:

    USE database_name

    SELECT * FROM table_name
    WHERE column_name = 'value'
    ORDER BY column_name

    GO
  • Mar 12, 2008, 04:24 AM
    ItsOnlyMe
    Quote:

    Originally Posted by chuckhole
    In SQL Server, you can create a Table View that filters only the records that you want to edit. This will make it safer than having all of the records shown. Then use something like MS Access to connect to your SQL Server View with an ODBC linked table.

    You can then edit the content (permissions allowing) of your data using your additional code with Access.

    Thanks for your reply. I am able to query the table and view the existing OLE Note object and edit them but I didn't want to have to edit 400 or so records individually. I was hoping to be able to create a table in Access (or perhaps in Excel to link or import) and then append the records to the SQL Server table.

  • All times are GMT -7. The time now is 06:09 PM.