CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2001
    Location
    USA
    Posts
    161

    Problem with sqlserver and binary

    hi, i m trying to read some data (supposed to be 10 integer) from my database declare binary (sqlserver) and i try to use getchunk like :

    dim a as variant
    a=rs("popol").getchunk(10)


    When i try it the error "operation not allowed in the context" apprears, why?
    How getting my info in a string or in integer??
    thx

    ---------------------------------------------
    Sure i got it... what s a form again?

  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Problem with sqlserver and binary

    the getchunk method retrieves a given numer of bytes to retrieve. If you try to retrieve more bytes than there are in the field, you will get an error. You can check the length of the data with the actualsize property of the field.

    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  3. #3
    Join Date
    Apr 2001
    Location
    USA
    Posts
    161

    Re: Problem with sqlserver and binary

    thx but even when i try to put a lengh of 1, it doesn t work..i don t know why
    i m sure something is in cause i do a actualsize and it return 10...
    please i reaally need help

    ---------------------------------------------
    Sure i got it... what s a form again?

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