Results 1 to 3 of 3

Thread: ADO SQL Server and text dataypes [resolved]

  1. #1

    Thread Starter
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141

    ADO SQL Server and text dataypes [resolved]

    I have something strange happening. I am pulling data from an SQL Server table. It has 5 columns.

    EmployerID int(4)
    ApplicationID int(4)
    EmployerName varchar(255)
    WorkPerformed text(16)
    EndDate datetime

    If I do "Select * from Employers" and then try to get the values out of a recordset, the WorkPerformed field is blank.

    Debug.Print rs.Fields(0) 'Gives the value
    Debug.Print rs.Fields(1) 'Gives the value
    Debug.Print rs.Fields(2) 'Gives the value
    Debug.Print rs.Fields(3) 'Empty String
    Debug.Print rs.Fields(4) 'Gives the value

    But, if I do "Select WorkPerformed From Employers"
    Debug.Print rs.Fields(0) 'Gives the value

    Any idea why this is happening? Even if I look in the immediates window at run time, it hows no value for WorkPerformed the first way either.
    Last edited by blindlizard; Feb 4th, 2004 at 11:57 PM.
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  2. #2
    Addicted Member akki's Avatar
    Join Date
    Jun 2003
    Location
    Jungle
    Posts
    220
    Place the BLOB/Text Fields at the End of the SELECT Query.

    If you don't get it, try
    try this Microsoft
    akki

  3. #3

    Thread Starter
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    Oh, great thanks. That explains it. It is by design because if the BLOB/Text Field was really big, you wouldn't want it cached in memory. So, I guess I can read it last, or just stick with the way I am doing it. Thanks again
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

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