CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    Apr 2007
    Posts
    68

    [RESOLVED] Storing a picture in SQL 2000

    Hi All

    I have the following code that I use to convert a picture into bytes.

    Code:
     Dim strImageFilePath As String = _ 
    LblPicture.Text 
    Dim fsImageFile As New FileStream(strImageFilePath, _ 
    FileMode.Open, FileAccess.Read) 
    Dim bytImageData(fsImageFile.Length() - 1) As Byte 
    fsImageFile.Read(bytImageData, 0, bytImageData.Length) 
    fsImageFile.Close()


    This then gets used to store into an SLQL 2000 VarBinary field.

    I thought the above would work but its only letting me save pictures that are under 8k in size, but I need to be able to save much bigger files than that.

    Any help is appreciated.

    Cheers

    Dougie
    Last edited by 1druid1; February 15th, 2010 at 06:26 AM. Reason: Answer Solved

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured