Inserting a MSWord file into an Access DB

Results 1 to 2 of 2

Thread: Inserting a MSWord file into an Access DB

  1. #1
    Dan L. Guest

    Default Inserting a MSWord file into an Access DB

    I&#039m trying to insert a MS Word file into an Access database defined with a field that has a data type of OLE Object. However, when I try to insert the file as I would any other field, I get an error. Here&#039s the code:<BR><BR>&#060;%@ Language=VBSCRIPT %&#062;<BR>&#060;% Option Explicit %&#062;<BR>&#060;!--#include virtual="/"--&#062;<BR>&#060;%<BR> Dim objConn<BR> Set objConn = Server.CreateObject("ADODB.Connection")<BR> objConn.ConnectionString = "DSN=IdeaSubmission.dsn"<BR> objConn.Open<BR> <BR> Dim objRS<BR> Set objRS = Server.CreateObject("ADODB.Recordset")<BR> objRS.Open "tblIdea", objConn, , adLockOptimistic, adCmdTable<BR> objRS.AddNew<BR> objRS("SubmitterID") = Request.Form("SubmitterID")<BR> objRS("DateSubmitted") = Request.Form("DateSubmitted")<BR> objRS("CurrentStatusID") = Request.Form("CurrentStatusID")<BR> objRS("IdeaDesc") = "d:wwwdltest.doc"<BR>&#039also tried --&#062; objRS("IdeaDesc") = Request.Form("IdeaFile")<BR> objRS.Update<BR> <BR> objRS.Close<BR> Set objRS = Nothing<BR> objConn.Close<BR> Set objConn = Nothing<BR>%&#062;<BR><BR>The error I get is:<BR><BR>Error Type:<BR> Provider (0x80040E21)<BR> Multiple-step OLE DB operation generated errors. Check each OLE DB status<BR> value, if available. No work was done.<BR> /test/ideasubmission/AddIdea.asp, line 17<BR><BR>Thanks in advance for any help!

  2. #2
    Join Date
    Dec 1969

    Default RE: Inserting a MSWord file into an Access DB

    there&#039s a tutorial on about insertin imags into OLE fields. the mechanism is essentially the same (word docs would be bigger) - so maybe checking there would help (?)<BR><BR>j

Posting Permissions

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