Article View: borland.public.cppbuilder.database.ado
Article #3627Re: Display MS Access on a C++Builder
From: Shaun
Date: Sun, 21 Jul 2002 13:32
Date: Sun, 21 Jul 2002 13:32
27 lines
1801 bytes
1801 bytes
Hi, Theres a few ways to do it, heres one way with odbc. Make an ODBC Connection to your Access Database Then open builder and drop a TQuery, TDBGrid, TDatasource on a form. In the Object Inspector make these settings, Datasource1->Dataset = Query1 DBGrid1-DataSource = DataSource1 Query1->DatabaseName = [SELECT FROM THE COMBOBOX, YOUR ODBC ALIAS FOR YOUR ACCESS DATABASE] Query1->Sql [double click on (TStrings)] and in the String List editor Type: select * from [table1] or whatever SQL statement that is relevant for you. Query1->Active = true. Your database should appear in your DBGrid at design time.To edit the column widths right click on the DBGrid and select "Columns Editor" Right click, select add all fields, then select a specific field and alter it in the Object Inspector. Hope this helps regards Shaun
Technical Details
Message-ID:
<3d3ab34f_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!hermes.visi.com!news.maxwell.syr.edu!out.nntp.be!propagator2-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsReferences:
<3D37253A.61F4A6F1@whsun1.wh.whoi.edi>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,c823d6213a5737e9 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-07-21 06:28:25 PST From: "Shaun" <nospam@nospam.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3D37253A.61F4A6F1@whsun1.wh.whoi.edi> Subject: Re: Display MS Access on a C++Builder Date: Mon, 22 Jul 2002 01:32:07 +1200 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 202.37.167.75 Message-ID: <3d3ab34f_1@dnews> X-Trace: dnews 1027257167 202.37.167.75 (21 Jul 2002 06:12:47 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!hermes.visi.com!news.maxwell.syr.edu!out.nntp.be!propagator2-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews