- - PR -
SQLServerへのビットマップイメージの更新
1
投稿者 | 投稿内容 |
---|---|
|
投稿日時: 2004-02-07 11:27
SQLServer2000へ接続しているACCESS2000のadpでVBAにて
image型のフィールドにビットマップイメージの更新しようと していますが、いきづまっています。 以下コード Dim rstTable As Recordset Dim stmImage As Stream Dim varImage As Variant Dim strImage As String Const strTable As String = "Table" Const strDir As String = "d:\\" Const strFilde1 As String = "AAA" Set rstTable = New Recordset rstTable.Open strTable, ConnectString(), adOpenKeyset, adLockOptimistic Set stmImage = New Stream stmImage.Open stmImage.Type = adTypeBinary Do Until rstTable.EOF strImage = strDir & rstTable(strFilde1) & ".bmp" stmImage.LoadFromFile strImage rstTable!Image = stmImage.Read rstTable.Update rstTable.MoveNext Loop stmImage.Close Set stmImage = Nothing rstTable.Close Set rstTable = Nothing 上記のコードを実行しても実際のテーブルを開いてみても 「ロングバイナリーデータ」となっていてビットマップイメージ になりません。(ACCESSのテーブルから手入力だとOK) ご教授お願いします。 |
1