Article View: borland.public.cppbuilder.database.ado
Article #144Re: Using ADO to bypass concurrency checks in a TADOQuery
From: Vassiliev V. V.
Date: Tue, 10 Apr 2007 20:01
Date: Tue, 10 Apr 2007 20:01
56 lines
2717 bytes
2717 bytes
It was Delphi code. In C++ it is:
#include <comobj.hpp>
enum ADCPROP_UPDATECRITERIA_ENUM
{ adCriteriaKey = 0,
adCriteriaAllCols = 1,
adCriteriaUpdCols = 2,
adCriteriaTimeStamp = 3
} ADCPROP_UPDATECRITERIA_ENUM;
If you use C++ Builder 6 you may need to fix its bug with:
namespace System
{
void __fastcall CheckSafecallResult(HRESULT hr)
{
OleCheck(hr);
}
}
Then:
ADOQuery1->Active = true;
ADOQuery1->Recordset->Properties->Item[WideString("Update
Criteria")]->Value = adCriteriaKey;
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"PaulR" <nospam_prodden@jwscorp.com_nospam> ???????/???????? ? ????????
?????????: news:461bc6f0$1@newsgroups.borland.com...
> Vassiliev V. V. wrote:
>> Try to set Recordset.Properties['Update Criteria'].Value to adCriteriaKey
>> ( = 0). After that it should locate row by key, not by all columns - be
>> sure that you have PK.
>
> Hi, thanks for your suggestion. I'm working in C++, and I'm having a hard
> time figuring out how to implement this in C++. The IDE shows the []
> being overridden, but I can't figure out how to pass in the property name.
> Doing Properties["Update Criteria"] doesn't work.
>
> Any suggestions?
>
> Thanks,
> Paul Rodden
Technical Details
Message-ID:
<461bed95@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!213.132.189.1.MISMATCH!multikabel.net!feed10.multikabel.net!tudelft.nl!txtfeed1.tudelft.nl!feeder.news-service.com!newsfeed.freenet.de!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<461ac4e3$1@newsgroups.borland.com> <461b9ea0$1@newsgroups.borland.com> <461bc6f0$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,c660d6ef8236021d X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Vassiliev V. V." <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <461ac4e3$1@newsgroups.borland.com> <461b9ea0$1@newsgroups.borland.com> <461bc6f0$1@newsgroups.borland.com> Subject: Re: Using ADO to bypass concurrency checks in a TADOQuery Date: Wed, 11 Apr 2007 00:01:40 +0400 Lines: 58 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-RFC2646: Format=Flowed; Response X-Antivirus: avast! (VPS 000732-0, 10.04.2007), Outbound message X-Antivirus-Status: Clean NNTP-Posting-Host: 85.93.138.132 Message-ID: <461bed95@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1176235413 85.93.138.132 (10 Apr 2007 13:03:33 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!213.132.189.1.MISMATCH!multikabel.net!feed10.multikabel.net!tudelft.nl!txtfeed1.tudelft.nl!feeder.news-service.com!newsfeed.freenet.de!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail