🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Selecting data from an Excel spreadsheet into a database table.

#1448
From: Peter Nunn
Date: Mon, 14 Jun 2004 11:46
27 lines
1781 bytes
Hi folks,

I'm struggling with an app in which I need to update a database with
data stored in an Excel spreadsheet.

I've done a bit of hunting around on the net and it seems that some
sort of ODBC connection would be the best way to do this (easier than
parsing the spread sheet line by line) but I can't seem to get it to
work for me.

I've setup a system DSN for the spreadsheet (although it would be nice
not to have to do this), pointed a TADOConnection compenonent to that
and set active true (so far so good).

When I add a TADOTable however and connect that to the ADOConnection I
don't see any of the workbooks in the table list.

I tried adding Sheet1$ to the table name (from the net) but when I set
active here I get an error

Syntax error in from clause.

Any ideas what I should be doing please?

ta.
Peter.
 
Technical Details
Message-ID: <bo3rc0defgrbhs3covm9ld7sv9r9s3ke9i@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.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-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,2eabea38f2dfa61,start
X-Google-Attributes: gid10698b,public
From: Peter Nunn <pnunn@infoteq.com.au>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Selecting data from an Excel spreadsheet into a database table.
Date: Mon, 14 Jun 2004 21:46:44 +1000
Organization: Infoteq P/L
Reply-To: pnunn@Infoteq.com.au
Message-ID: <bo3rc0defgrbhs3covm9ld7sv9r9s3ke9i@4ax.com>
X-Newsreader: Forte Agent 2.0/32.646
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 203.113.217.5
X-Trace: newsgroups.borland.com 1087214703 203.113.217.5 (14 Jun 2004 05:05:03 -0700)
Lines: 27
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail