Kalau Pake Sintak SQL Bagaimana apa bisa ????? On 4/19/07, simbok_cahyo <[EMAIL PROTECTED]> wrote: > > mungkin ini bisa membantu, intinya adalah penggunaan metode > AppendChunk. > > Private Sub Command1_Click() > Dim PictBmp As String > Dim ByteData() As Byte 'Byte array for Blob data. > Dim SourceFile As Integer > Dim NumBlocks As Integer > Dim LeftOver As Long > Dim BlockSize As Long > > Conn.Open "bla bla bla" 'Connection stringnya isi sendiri ya > Rs.Open "SELECT Gambar FROM TabelGambar", Conn, adOpenKeyset > > PictBmp = "C:\dosing.mdb" 'file gambar yang mau di save ke > database > SourceFile = FreeFile > Open PictBmp For Binary Access Read As SourceFile > > FileLength = LOF(SourceFile) ' Get the length of the file. > > If FileLength <> 0 Then > BlockSize = IIf((BlockSize > 10000), 10000, BlockSize) > > NumBlocks = FileLength / BlockSize > LeftOver = FileLength Mod BlockSize > > Rs.AddNew > > ReDim ByteData(LeftOver) > Get SourceFile, , ByteData() > Rs.Fields!Gambar.AppendChunk ByteData() > > ReDim ByteData(BlockSize) > For i = 1 To NumBlocks > Get SourceFile, , ByteData() > Rs.Fields!Gambar.AppendChunk ByteData() > Next i > Rs.Fields!Gambar.Update 'Commit the new data. > > Close SourceFile > End If > > > End Sub > > salam, > cahyo > > --- In [email protected] <indoprog-vb%40yahoogroups.com>, > andreas sulistiyo > <[EMAIL PROTECTED]> wrote: > > > > salam programmer, > > ada yang tau caranya masukan gambar di sqlserver pake vb? > > misal fieldnya:gambar, typedata:image->binay > > tolong pencerahannya. > > thanks > > > > --------------------------------- > > Ahhh...imagining that irresistible "new car" smell? > > Check outnew cars at Yahoo! Autos. > > > > [Non-text portions of this message have been removed] > > > > >
[Non-text portions of this message have been removed]
