🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: creating and opening a fabricated Recordset

#4896
From: Ross Pellegrino
Date: Sun, 26 Aug 2001 22:18
93 lines
3821 bytes
I would love too and I tried to convince my new boss (just started this job)
to go with delphi.  But he's a hard nose VC++ guy and doesn't see the
simplicity in Delphi or C++ Builder.

Ross

"Satya S Kolachina" <skolachi@etsolutionsinc.com> wrote in message
news:3b88ff4d$1_1@dnews...
> 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: <3b8974d3_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!btnet-peer1!btnet-peer0!btnet-peer!btnet!newsfeed.bt.es!195.5.65.34.MISMATCH!caladan.arrakis.es!dnews
References: <3b811340$1_2@dnews> <3b833a80.15227836@newsgroups.borland.com> <3b87c393$1_1@dnews> <3b88ff4d$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 15:22:13 PST
Reply-To: "Ross Pellegrino" <ross_pellegrino@hotmail.com>
From: "Ross Pellegrino" <ross_pellegrino@hotmail.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3b811340$1_2@dnews> <3b833a80.15227836@newsgroups.borland.com> <3b87c393$1_1@dnews> <3b88ff4d$1_1@dnews>
Subject: Re: creating and opening a fabricated Recordset
Date: Sun, 26 Aug 2001 18:18:42 -0400
Lines: 95
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.100.121.155
Message-ID: <3b8974d3_1@dnews>
X-Trace: dnews 998864083 24.100.121.155 (26 Aug 2001 15:14:43 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!btnet-peer1!btnet-peer0!btnet-peer!btnet!newsfeed.bt.es!195.5.65.34.MISMATCH!caladan.arrakis.es!dnews