How to import word document database

Category: MS-SQL Server -> Applications Author: sxdtyzg Date: 2001-12-27 19:08:42
 
sxdtyzg
2001-12-27 19:08:42
As stated recently added new functionality to customer requirements, but the raw data is a Word document, how to import the data into the database.
lucifer76
2001-12-27 19:15:04
dts
lihongzte
2001-12-27 19:17:57
2005 using ssis
spspli
2001-12-27 19:24:59
all insects, have a drink
zjw200905
2001-12-27 19:34:28
2000 only sp_textcopy ;
PENG050213
2001-12-27 19:47:56

image


1、
CREATE PROCEDURE sp_textcopy ( 
  @srvname    varchar (30), 
  @login      varchar (30), 
  @password    varchar (30), 
  @dbname      varchar (30), 
  @tbname      varchar (30), 
  @colname    varchar (30), 
  @filename    varchar (30), 
  @whereclause varchar (40), 
  @direction  char(1)) 
AS 
DECLARE @exec_str varchar (255) 
SELECT @exec_str = 
        'textcopy /S ' + @srvname + 
        ' /U ' + @login + 
        ' /P ' + @password + 
        ' /D ' + @dbname + 
        ' /T ' + @tbname + 
        ' /C ' + @colname + 
        ' /W "' + @whereclause + 
        '" /F ' + @filename + 
        ' /' + @direction 
EXEC master..xp_cmdshell @exec_str  

2、
create table   (  int,image  image)
go
insert   values(1,0x)    --  , null
insert   values(2,0x)    --  , null
go

3、
sp_textcopy ' ','sa',' ',' ',' ','image ','c:\ .bmp','where  =1','I' --   =1

sp_textcopy ' ','sa',' ',' ',' ','image ','c:\bb.doc','where  =2','I' --   =2

go

4、
sp_textcopy ' ','sa',' ',' ',' ','image ','c:\ .bmp','where  =1','O' --   =1

sp_textcopy ' ','sa',' ',' ',' ','image ','c:\bb.doc','where  =2','O' --   =2
go

textcopy ,
C:\Program Files\Microsoft SQL Server\MSSQL\Binn
 textcopy.exe :
C:\Program Files\Microsoft SQL Server\80\Tools\Binn
liangtianwang
2001-12-27 19:50:05
textcopy at 05 without
yifan_msn
2001-12-27 19:52:56
smgzfhxy
little firefly
etc. Grade:
Posted :2008 -01-09 15:03:157 Re: 0
or not a

------------------
check error message. . . Even more than once tested is possible. .
fsd111
2001-12-27 20:11:54
SISS Well, easy to use, haha ​​
xuyunao
2001-12-27 20:22:59
the WORD document into EXCEL or ACESS, then import into it. Such data has a normative, or imported data and imagination is not the same
3sat
2001-12-27 20:25:06
I have this ready-made, see for yourself, do not forget to give the sub-Oh:
any files stored in ORACLE database

photos stored in an SQL database

actually any files are the same operation.
cnplee
2001-12-27 20:36:35
any documents stored in ORACLE database