Article View: borland.public.cppbuilder.database.ado
Article #2111TADOTable and data-aware components, or TADO Command?
From: Jason Shrapnel
Date: Thu, 06 Nov 2003 22:49
Date: Thu, 06 Nov 2003 22:49
34 lines
2569 bytes
2569 bytes
Hi there, I'm trying to figure out the best way to interface between a client application and a mysql server using ADO. I have tried using TADOTables with data-aware components to automate the posting process - ie using TADOTable methods Edit(), Insert(), and Post(). Unfortunately I encountered many problems using this method, specifically when I tried to post Date values. Another method I have tried was to use the TADOCommand component and build SQL query strings based on what the user is doing then passing that string through to the server. This seems to work well but involves a great deal more coding and huge modifications to the existing program structure. As I have little experience working with ADO I was hoping someone could give me advice on which is the best option to choose given the above information. If a solution was found to overcome the problem with posting Date values using the TADOTable component (or some other component that allows data-aware editing components to connect to it) then that might be the preferred option. Currently the MYSQL table I am using is of type InnoDB. I have tried using TimeStamp, DateTime, and Date field types to post the date. Using the TimeStamp field I receive an E_Fail exception if any of the TimeStamp fields have blank data (the TimeStamp field does not allow null values for some reason). Using the DateTime and Date fields, I receive "Row cannot be located for updating" errors, although the row is definately available. I am using MDAC 2.6 and MYSQL 4.0.16 running on a Win2k Server. Any advice or help that can be offered would be appreciated, Thankyou, Jason Invarion Pty Ltd
Technical Details
Message-ID:
<3faacfde@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,576fb9af2138d9fa,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-11-06 15:09:57 PST From: "Jason Shrapnel" <jason@invarion.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: TADOTable and data-aware components, or TADO Command? Date: Fri, 7 Nov 2003 09:49:03 +1100 Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 202.174.228.150 Message-ID: <3faacfde@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1068158942 202.174.228.150 (6 Nov 2003 14:49:02 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail