Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002

    Angry Unanswered: Error when passing date values via ADO Recordset.Open method


    SQL Server

    The following works in the US locale, but not UK locale(2057).

    Recordset.Open "sp_GetEvent '" & strDate & "'

    The following error is generated:

    "Error converting data type varchar to datetime"

    I have to use Recordset.Open due to specified cursor type. I know I can set the active connection, command text and parameters etc... in a command object and have the recordset open the command object, but due to time constraints, this might be too costly.

    Am I doing something wrong? What am I missing? Is there a quick fix?

    Remember... this is NOT problem in the US. I'm having the problem when changing the regional settings from US to UK.

    Thanks in advance.

  2. #2
    Join Date
    Feb 2002
    What is the format of the date that is being passed ? Also, are you converting the date ? You can do the following with the stored procedure - convert(datetime,'31-12-1999 15:00',103) - The 103 is for British/French date formats.

  3. #3
    Join Date
    Jul 2003
    Amsterdam, Nederland

    Wink hi

    U can allso use Cdate functin


Posting Permissions

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