Importing Word documents into SQL Server 7.0

  • I'm trying to import Word documents into SQL Server. Any help would be appreciated.

  • For SQL Server 7.0, the samples (which are an option when installing) has the TEXTCOPY.exe  From Books On Line:

    TextCopy is a Microsoft Foundation Class (MFC) C++ example that illustrates handling Microsoft® SQL Server text and image data types. The example moves data either to or from a single server column and row, and a user-specified operating system file.

    Default Location C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Samples\DBLib\TextCopy

     For SQL Server 2000, there is also the Bii.exe

    This sample is a stand-alone console application that mimics the bcp utility that ships with Microsoft® SQL Server™ 2000. Unlike the bcp utility, the bii utility detects when an image field is the destination database field and the input is a filename that can be located in the file system. In this case, instead of loading the filename string into the image field, the program opens the file, loads the data, and inserts the file contents in the image data type field.

    Default Location C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Samples\Utils\bii

    SQL = Scarcely Qualifies as a Language

  • See if this helps:

    http://www.microsoft.com/resources/documentation/sql/2000/all/reskit/en-us/part3/c1161.mspx

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • I have used textcopy.exe which comes with sample extensively and it works like a charm. the simple way would be insert the rows in the destination table with the file names in a column if possible including the path. And generate a sql statement like below and run it in Query analyzer:

    select 'textcopy /Sxxxx /Uxxx /Pxxx /Dxx /Txx /Cxx /W "where primarykey='+primarykey+' /Ffilenamecol /I' from filetable

    Then save the results to as copyfiletosql.bat (ms dos batch file) and run in command line prompt. I hope this helps.

    At one point i had to load around 500,000 multi file tiff images to the "image" column in a table. So instead of running the textcopy.exe for each file I modified the source code of Textcopy.EXE and have it to take a input file which contains where clause in each line instead of a where clause in the command line. This enhanced the process a lot. Let me know if you need that utility.

    Thanks

    Ramesh

  • yeah, that would be gr8 if you upload the modified utility.

    thx

    Naveen

  • If you don't have the opportunity, I would be willing to host it on my site.

    Apart from being interested myself in the tool itself.

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply