🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

How to Access Excel File by ADOQuery

#1163
From: FlyR
Date: Tue, 12 Oct 2004 03:03
34 lines
1500 bytes
my ADOQuery Control set as follow.

  object Query: TADOQuery
    ConnectionString =
      'Provider=MSDASQL.1;Persist Security Info=False;Data Source=Data
    Parameters = <>
    Left = 48
    Top = 40
  end




void __fastcall TForm1::Button1Click(TObject *Sender)
{
AnsiString SqlStr;

SqlStr="Select * from ImageDataBase";
Query->SQL->Clear();
Query->SQL->Add(SqlStr);
Query->Open();

Query->Append();
Query->FieldValues[0] ="test";
Query->Post();
}

then I add a ODBC data source for Excel file. The Data Soruce name is
"Data".


I Excute this program. It has something wrong. But I cant solve it. Please
help me.
Thanx.
Technical Details
Message-ID: <416b493e@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!proxad.net!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,417b4be6798e6a92,start
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "FlyR" <john.wild@msa.hinet.net>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: How to Access Excel File by ADOQuery
Date: Tue, 12 Oct 2004 11:03:08 +0800
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 218.171.174.124
Message-ID: <416b493e@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1097550142 218.171.174.124 (11 Oct 2004 20:02:22 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!proxad.net!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail