🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #4894

Re: creating and opening a fabricated Recordset

#4894
From: Satya S Kolachina
Date: Sun, 26 Aug 2001 13:53
81 lines
3360 bytes
Hello,

Using C++Builder ADO Express components is very easy. Please try it. You
will like it. Using in VC++ is very cumbersom and tough.
I am myself using BCB's ADO Express very comfortably. I wasted a lot of time
with VC++. Even the MSDN Examples do not compile directly first time
properly in VC++.

With BCB, you can do it in less than an hour, if you are familiar with BCB,
which was impossible in VC++ for me.

Satya

"Ross Pellegrino" <rpel@home.come> wrote in message
news:3b87c393$1_1@dnews...
> Ok, thanks.  I'm using straight ADO and not ADO Express. But I can look
inot
> CreateDataSet and see how they are doing it. Unfortunetly, I'm force to
use
> VC++. To cumbersom to use.
>
> Thanks
>
>
> "Giuliano" <gcardinali@remove.adhoc.net> wrote in message
> news:3b833a80.15227836@newsgroups.borland.com...
> > On Mon, 20 Aug 2001 09:44:09 -0400, "Ross Pellegrino" <rpel@home.come>
> wrote:
> >
> > >Hi
> > >
> > >does anyone know how to create a fabricated recordset and open it for
> adding
> > >new records to it?
> > >
> > >Any help would be appreciated.
> > >
> > >Thanks in advance.
> > >Rp
> > >
> >
> > Hi Ross,
> >
> >     just drop a TADODataSet component from the ADO palette
> > page. Then, try to add, for exemple, this code in order to
> > create the memory recordset.
> >
> > ADODataSet1->FieldDefs->Clear();
> >
> > // Create 1st field
> > TFieldDef *NewDef = ADODataSet1->FieldDefs->AddFieldDef();
> > NewDef->Name = "Field1";  // Name for Field #1
> > NewDef->DataType = ftInteger; // Type for Field #1
> >
> > // Create 2nd field
> > NewDef = ADODataSet1->FieldDefs->AddFieldDef();
> > NewDef->Name = "Field2";  // Name for Field #2
> > NewDef->DataType = ftString; // Type for Field #2
> > NewDef->Size = 30;  // Length for Field #2
> >
> > // and so on with the others fields...
> >
> > // Create the dataset
> > ADODataSet1->CreateDataSet();
> >
> > You don't need to open ADODataSet after TADODataSet::CreateDataSet().
> >
> > To add some records you can use, for example, the following pattern:
> >
> > ADODataSet1->Insert();
> > ADODataSet1->FieldByName( "Field1" )->Value = 10;
> > ADODataSet1->FieldByName( "Field2" )->Value = "Folaghe";
> > ADODataSet1->Post();
> >
> > HTH
> >
> > Ciao
> >
> > Giuliano
>
>
Technical Details
Message-ID: <3b88ff4d$1_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews
References: <3b811340$1_2@dnews> <3b833a80.15227836@newsgroups.borland.com> <3b87c393$1_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,3254ea8bf011eb6b
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-08-26 07:00:35 PST
Reply-To: "Satya S Kolachina" <skolachi@etsolutionsinc.com>
From: "Satya S Kolachina" <skolachi@etsolutionsinc.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3b811340$1_2@dnews> <3b833a80.15227836@newsgroups.borland.com> <3b87c393$1_1@dnews>
Subject: Re: creating and opening a fabricated Recordset
Date: Sun, 26 Aug 2001 08:53:43 -0500
Lines: 83
Organization: Emerging Technology Solutions, Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2462.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000
NNTP-Posting-Host: 24.17.249.137
Message-ID: <3b88ff4d$1_1@dnews>
X-Trace: dnews 998833997 24.17.249.137 (26 Aug 2001 06:53:17 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews