Article View: borland.public.cppbuilder.database.ado
Article #423Re: Why have I got wrong record from this table?
From: Erol Fornoles
Date: Thu, 23 Nov 2006 04:05
Date: Thu, 23 Nov 2006 04:05
25 lines
2059 bytes
2059 bytes
I experienced something similar to this one, when I was migrating
DateTime values from an MS Access db to MySQL using TADOQuery. My code
looked something like this:
while (!adoAccess->Eof)
{
adoMySQL->Append();
adoMySQLDT->Value = adoAccessDT->Value;
adoMySQL->Post();
adoAccess->Next();
}
When I inspected the migrated records on MySQL, I found out that most
of the records were off by a second. But if I do this:
adoMySQLDT->Value = StrToDateTime(DateTimeToStr(adoAccessDT->Value));
The resulting records are correct.
Another baffling thing is prior to this one, I had no problem migrating
DateTime values from Interbase/Firebird (using DBX) to MySQL (using
ADO).
- Erol
Technical Details
Message-ID:
<1164254717.146599.61210@l39g2000cwd.googlegroups.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!postnews.google.com!l39g2000cwd.googlegroups.com!not-for-mailReferences:
<4549a412@newsgroups.borland.com> <454a27aa$1@newsgroups.borland.com> <454a2986$1@newsgroups.borland.com> <454aefc9@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,b24adba74fe8905 X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!postnews.google.com!l39g2000cwd.googlegroups.com!not-for-mail From: "Erol Fornoles" <erol.fornoles@gmail.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: Re: Why have I got wrong record from this table? Date: 22 Nov 2006 20:05:17 -0800 Organization: http://groups.google.com Lines: 26 Message-ID: <1164254717.146599.61210@l39g2000cwd.googlegroups.com> References: <4549a412@newsgroups.borland.com> <454a27aa$1@newsgroups.borland.com> <454a2986$1@newsgroups.borland.com> <454aefc9@newsgroups.borland.com> NNTP-Posting-Host: 124.104.4.81 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1164254723 8090 127.0.0.1 (23 Nov 2006 04:05:23 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 23 Nov 2006 04:05:23 +0000 (UTC) In-Reply-To: <454aefc9@newsgroups.borland.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: l39g2000cwd.googlegroups.com; posting-host=124.104.4.81; posting-account=eSwwBg0AAABefeuJ5pOS_k670Rlobybv