🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Create ADO Table

#1465
From: Viatcheslav V. Vassiliev
Date: Thu, 24 Jun 2004 13:13
54 lines
2835 bytes
Use in-memory recordsets. Create ADODB recordset object and add needed
fields (look MSDN on how to do this - it is easy), then do

ADODataSet1->Recordset = MyRecordset;

If you need on-disk data (for example, very much data and you do not want to
hold them in memory), you may use MS Jet (MS Access) databases - create
database with ADOX.

//------------------------------------------
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)

"kev" <kev@isp.com> �������/�������� � �������� ���������:
news:40d98b79$1@newsgroups.borland.com...
> I am currently using a TTable, creating the fields dynamically at runtime
> and using it to temporarily old data from ADO datasets.  This requires me
to
> install the BDE on the target system.  I would like to avoid having to be
> tied to BDE if at all possible.  Is there a way for me to do so using one
of
> the ADO components?  I have tried several approaches with no success. A
> sample of my current TTable code is below.  Thanks for any help.
>
>     Table1->Active = false; // The Table component must not be active
>
>     Table1->DatabaseName = "BCDEMOS";
>     Table1->TableType = ttParadox;
>
>     Table1->TableName = "MyTempTable";
>
>     // describe the fields in the table
>     Table1->FieldDefs->Clear();
>
>     TFieldDef *pNewDef = Table1->FieldDefs->AddFieldDef();
>     pNewDef->Name = "Location.";
>     pNewDef->DataType = ftString;
>     pNewDef->Required = false;
>     pNewDef->Size = 8;
>     .
>     .
>     .
>
>     // Now that we have specified what we want, create the table
>     Table1->CreateTable();
>
>     Table1->Active = true; // The Table component must not be active
>
>
>
Technical Details
Message-ID: <40dad37f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <40d98b79$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,9588410ac5d71a1a
X-Google-Attributes: gid10698b,public
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <40d98b79$1@newsgroups.borland.com>
Subject: Re: Create ADO Table
Date: Thu, 24 Jun 2004 17:13:35 +0400
Lines: 56
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: 213.234.218.42
Message-ID: <40dad37f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1088082815 213.234.218.42 (24 Jun 2004 06:13:35 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail