From: karl-heinz reichel Date: October 19 1999 7:15am Subject: Re: Date Fields and Visual C++ List-Archive: http://lists.mysql.com/myodbc/792 Message-Id: <000601bf1a01$c2c875f0$c90aa8c0@idefix2> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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. >