A。DTSX 方案:
 建立directory 比如
:c:\import\images\.——
建立目录表CREATE TABLE dbo.images(
    [imagesPath] [varchar](50) NOT NULL,
    [Document] image
)
C:\import\images\1.JPG
C:\import\images\2.JPG
C:\import\images\3.JPG
有很多小工具例如文件批处理器等等可以直接得到directory,不用手一个一个输入。
或者更加好的方法是在控制流中添加for each文件枚举器,把整个目录(可以包括子目录)美举到结果集变量中。再建立SQL任务,把结果集导入上面的表中。
——建立ssis项目——添加数据流——添加源——运行包
B。。net 方案
先建立数据库和sql命令的静态类
然后建立web application 或者
windows appliction 在窗体里面添加for each loop命令
DirectoryInfo d = new DirectoryInfo(Server.MapPath("~/Upload"));
foreach (FileInfo f in d.GetFiles("*.jpg")) {
byte[] buffer = new byte[f.OpenRead().Length];
f.OpenRead().Read(buffer, 0, (int)f.OpenRead().Length);

C.可以单单导入directory ,然后在程序中建立GRIDVIEW 模板列也可以看到照片,随便你了。