Article View: comp.lang.java
Article #533****** JavaBean for Database Applications available ******
From: Vincenzo Caselli
Date: Sun, 25 Jan 1998 00:00
Date: Sun, 25 Jan 1998 00:00
80 lines
3272 bytes
3272 bytes
New component for java database developers.
Visit
http://www.sirius.pisa.it/caselli
Description:
TableCopy Java Bean
This bean allows to create a table with the same structure of a
specified source table or result of an SQL SELECT statement and/or
copy the rows from Source table into the new or pre-existing
Destination table .
Data types supported include text, numeric, date, boolean, memo and
their related types depending on the specific database in use.
Binary or Image types are not currently supported. Column type that
are not supported will not be created/transferred.
If you do encounter problems in using the bean, please send an e-mail
to cens@sirius.pisa.it indicating the database and the ODBC driver
in use, as well as the structure of the tables involved.
Properties:
Name Type Meaning
SourceDriver String Source database driver
("sun.jdbc.odbc.JdbcOdbcDriver" if using the JDBC-ODBC Bridge)
SourceDatabase String Source database connection string
("jdbc:odbc:<DataSourceName>" if using the JDBC-ODBC Bridge,
see DataSourceName in the 32-bit ODBC of Control Panel)
SourceTableName String Name of the table used to read data
SourceSQL String SQL SELECT statement used to read data;
leave blank when using SourceTable
(may perform a join on different tables)
DestDriver String Destination database driver
(See SourceDriver)
DestDatabase String Destination database connection string
(See DestDriver)
DestTableName String Name of the table to create and/or fill with
read data
Decimals int Number of decimals for numeric fields, when source
does not provide it
Mode int 0: create* only structure
1: create* and fill with data from source
2: copy data in a pre-existing table
Run boolean set to true is an alternative way to launch execute
method
(may be used at development time)
RowCount int holds the number of transferred rows, while copying
Done boolean becomes true when action is finished
(*) If destination table already exists, it will be erased.
Method:
void execute(void);
perform action specified by the above properties.
The method is also triggered when Run property is set to true
Warning:
Make sure the destination table is not opened by other applications
while using the bean.
The demo version of TableCopy is limited in the number of record being
transferred;
please read Register.txt to know about how to receive your registered
copy.
The bean was developed with JDK 1.1.
Submit bugs or comments to:
cens@sirius.pisa.it
Technical Details
Message-ID:
<6ag56b$hbd$2@server2.cpr.it>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10a146,37e48fcef191f23d,start X-Google-Attributes: gid10a146,public X-Google-Thread: f5d71,37e48fcef191f23d,start X-Google-Attributes: gidf5d71,public X-Google-Thread: 1073da,37e48fcef191f23d,start X-Google-Attributes: gid1073da,public From: cens@sirius.pisa.it (Vincenzo Caselli) Subject: ****** JavaBean for Database Applications available ****** Date: 1998/01/25 Message-ID: <6ag56b$hbd$2@server2.cpr.it> X-Deja-AN: 319181985 Organization: Consorzio Pisa Ricerche Newsgroups: comp.lang.java,comp.lang.java.programmer,borland.public.jbuilder.database