List:MySQL ODBC« Previous MessageNext Message »
From:Pat Sherrill Date:October 19 1999 12:15pm
Subject:Re: Date Fields and Visual C++
View as plain text  
Thank-you for your response,

I am using CDaoRecordset with a jet database link to a myodbc database.  The
recordset uses COleDateTime for the data field exchange and doesn't seem to
like the string type returned from the Format member of that class.  I'm not
that great with MFC, is there a work around to fool the data exchange class
into accepting a properly formatted SQL date string in lieu of a
COleDateTime value?

Pat...

----- Original Message -----
From: karl-heinz reichel <karl-heinz_reichel@stripped>
To: MYSQL Mailing List <mysql@stripped>; <myodbc@stripped>
Sent: Tuesday, October 19, 1999 3:15 AM
Subject: Re: Date Fields and Visual C++


>
> Hi Pat,
> we are working with COleDateTime datatypes, and it seems to be working
with
> mysql.
> There are several ways to work with mysql and MS V++.
> 1. You are using the CRecordset class of the MSVC. In VC++ 5.0 Microsoft
> uses CTime class
>     and you have nothing to do, as to set CTime correctly and to do an
> update of the recordset.
> 2. You are using direct SQL Statements ( with the CDatabase class for
> example)
>     There we use the COleDateTime class. But You cannot use this class
> directly with the SQL-Statement.
>     So you have to use the Format function of COleDateTime to generate a
> ODBC compatible Date-String
>     Then You can use the Update, Insert commands correctly
>
> regards
> karl-heinz
>
>
> >I seem to have a dilemma using CTime or COleDateTime types.  When
updating
> >the record (jet linked to myodbc) I either receive a multiuser
interference
> >error (yes, I have a unique column and a timestamp(14)) or the column is
> set
> >to empty when changing the date (either using a standard edit control or
a
> >DateTimePicker control).
> >
> >Does anyone have a clue?
> >
> >TIA
> >
> >Pat...
> >
> >
> >---------------------------------------------------------------------
> >Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> >posting. To request this thread, e-mail mysql-thread16303@stripped
> >
> >To unsubscribe, send a message to the address shown in the
> >List-Unsubscribe header of this message. If you cannot see it,
> >e-mail mysql-unsubscribe@stripped instead.
> >
>
>
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail myodbc-thread792@stripped
>
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail myodbc-unsubscribe@stripped instead.
>
>

Thread
Date Fields and Visual C++Patrick Sherrill18 Oct
  • Re: Date Fields and Visual C++Bogdan Paduraru19 Oct
Re: Date Fields and Visual C++(karl-heinz reichel)19 Oct
  • Re: Date Fields and Visual C++Pat Sherrill19 Oct