Results 1 to 2 of 2

Thread: ADODB recordset

  1. #1
    2 Star Lounger
    Join Date
    Sep 2003
    Toronto, Ontario, Canada
    Thanked 0 Times in 0 Posts

    ADODB recordset

    Hi there,
    I am using ADO within an xml/asp based web application to grab values out of an Excel workbook. The connection string is fine, but I am having problems with the data types:
    If my query range includes date/time fields on the spreadsheet, it will display all the text fields as null, but the date/times fields will display fine.
    If I exlcude the date/time fields from my query range, the text fields display properly.

    Has anyone heard of this happending before? It's as if the ADODB recordset can only handle EITHER numeric values or textvalues, but not both...
    Any help or references would be appreciated,

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Silicon Valley, USA
    Thanked 94 Times in 90 Posts

    Re: ADODB recordset

    Does it help to do something like this?

    SELECT Text1, Text2, FormatDate(Date1) as TextOfDate1, Text3

    (I haven't reminded myself of the parameters for FormatDate, but you can look them up on Microsoft's site.)

Posting Permissions

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