Upload files to SQL-Database

Results 1 to 2 of 2

Thread: Upload files to SQL-Database

  1. #1
    Dalibor Hinic Guest

    Default Upload files to SQL-Database

    Hi,<BR>I have problems to upload files (bmp, jpg, gif, doc, ppt, xls) to an SQL-7 database. The file-upload must also work with files bigger then 50MB.<BR>If you had some impression please mail to<BR><BR>Dalibor.Hinic@wit.siemens.de<BR>

  2. #2
    Leungas Guest

    Default RE: Upload files to SQL-Database

    These are the code I used in mine...hope it give you some idea<BR><BR>Public Function OpenFile(ByVal fn As String) As Integer<BR> Dim fp As Integer<BR> fp = FreeFile(0)<BR> Open fn For Binary Access Read As fp<BR> OpenFile = fp<BR>End Function<BR><BR>Public Function GetLength(ByVal fp As Integer) As Long<BR> Dim l As Long<BR> l = LOF(fp)<BR> GetLength = l<BR>End Function<BR><BR>Public Function GetBlock(ByVal fp As Integer, ByVal ln As Long) As Variant<BR> Dim block() As Byte<BR> ReDim block(ln)<BR> &#039Dim block As String<BR> &#039block = String(ln, " ")<BR> Get fp, , block<BR> GetBlock = block<BR>End Function<BR><BR>Public Function CloseFile(ByVal fn As Integer)<BR> Close fn<BR>End Function<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts