SQLInsertFile
DataRow的一个方法,用于直接向二进制列中插入文件。
语法:
SQLInsertFile(Field,FileName)
Field:     字符型,二进制列的列名
FileName:  字符型,要插入文件的文件名
示例
选择一个Word文件,并插入到员工表的附件列中:
		If
		Tables("员工").Current
		Is Nothing
		Then
		    Return
		End If
		Dim dr 
		As DataRow =
		Tables("员工").Current.DataRow
		If dr.RowState 
		= DataRowState.Added
		Then 
		'如果是新增行,必须先保存才能插入文件
		    
		
		dr.Save()
		End If
		Dim dlg 
		As New 
		OpenFileDialog
		dlg.Filter = 
		"Word文件|*.doc"
		
		If
		dlg.ShowDialog 
		=DialogResult.OK
		Then
		    dr.SQLInsertFile("附件",dlg.FileName)
		'插入文件
		
		End 
		If
提示:请自行思考一下,为什么新增行必须先保存才能插入文件呢?