Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    OLE Data in Access from SQL Server (Access 2K, Win 2KPro, SQL Server 2K)

    I have a system setup to upload files via a webform (multipart) to SQL Server and am trying to re-tool the way one access the uploaded documents. Currently, I have a hyperlink on an Access form that opens the requires HTML page for viewing/managing attached documentation. I would like to move this function into an Access form so that I can stipulate a standard share drive folder for downloading the files. It would also be nice to view the files in Access. these are .txt, .doc, .xls and .pdf files, with a size limit of 2MBs. I used the form wizard to create a form on the linked SQL Server table and it does in fact build a form with an OLE field for displaying the documentation, but when I try to activate it I get an error saying the "A problem occured when activating the OLE Server" and advised to activate the server outside Access and try again.

    Any ideas? There's no VBA attached to the form, but I'll check the references anyway for now.

    Also, if anyone has had experience trying to use Access to handle OLE files, let me know if this idea is worth pursuing. I already have a way to do what I want, kinda, so I am trying to improve on a (fairly) adequate solution.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: OLE Data in Access from SQL Server (Access 2K, Win 2KPro, SQL Server 2

    I'm not a fan of using OLE fields. I prefer storing files outside the database, in the same folder or a subfolder. You can use a command button or label with code like this in the On Click event:

    Dim strFile As String
    strFile = ...
    Application.FollowHyperlink CurrentProject.Path & "" & strPath

    or use ShellExecute with "Open" as lpOperation argument - see <post:=529,891>post 529,891</post:>.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: OLE Data in Access from SQL Server (Access 2K, Win 2KPro, SQL Server 2

    I'm not all that interested in using OLE to display the documents, but the problem here is finding and manipulating files stored in the SQL Server. Your psuedocode seems to point to files on a share drive, which doesn't seem right for my setup. well, since I can get to the files using ASP perhaps the code in that can be adapted to a VB module... but, this is kind of a case of fixing something that's not really broken, just a little weird at first. users of the access db get punted to a ASP page on clicking the hyperlink, so access isn't the issue. I'm more like setting up a default folder to store the documents...perhaps there's an ASP solution instead.

    anyway, I'll think about it some more, as to whether this is 'a solution looking for a problem'

    but thanks for your response, as always.

Posting Permissions

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