Win a copy of Fixing your Scrum this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

exporting Apache derby database tables into excel

 
Master Rancher
Posts: 594
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wish to do the above..........

but am unsure how to answer the question "what is the name of your sql server"

I use netbeans to setup my databases and my tables

Bob M
 
Bob Matthews
Master Rancher
Posts: 594
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to use derby ij tools

so far..............

ij version 10.14

ij> connect 'jdbc.derby://localhost:1527/DCEvents';
ERROR 08001: No suitable driver found for jdbc.derby://localhost:1527/DCEvents

What am I doing wrong?

Bob M

p.s. I have a database called DCEvents
 
Bob Matthews
Master Rancher
Posts: 594
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK

tried connect 'jdbc:derby:C:\Apache\Derby\Databases\DCEvents';

ERROR 08004: connection athentication failure occurred. Reason: Invalid authentication..

What do I need to add ?

Bob M
 
Bob Matthews
Master Rancher
Posts: 594
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to add 'user' and 'password' properties I guess

what is the syntax for that ?

Bob M
 
Saloon Keeper
Posts: 24174
165
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you need to go back to this thread:

https://coderanch.com/t/744599/databases/connecting-Apache-Derby-database

Your URL appears to be set to lookup a networked server, but there's a DOS pathname in it like you're trying to access it embedded-style.

Also, I'm not totally certain that backslashes are proper in JDBC URLs.
 
Bob Matthews
Master Rancher
Posts: 594
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tim............

I am trying to use the derby ij tool

Yes - I am able to connect via a java program and add records to various tables - no problem there

I am just perplexed as to how to export a derby database table to excel in a simple and straightforward manner either using the ij tool or from within a java program
 
Tim Holloway
Saloon Keeper
Posts: 24174
165
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm afraid I don't know what the IJ database tool can do. For straight Derby there should be a pre-defined procedure that you can do a JDBC CALL on that will export to CSV format - you really wouldn't want to export to literal Excel form. I think I posted a link, but: https://db.apache.org/derby/docs/10.11/adminguide/cadminimport16245.html
 
Bob Matthews
Master Rancher
Posts: 594
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes - read that!

but still can't seem to get anything to work

Bob M
 
Bob Matthews
Master Rancher
Posts: 594
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have just tried :-

CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE
  (null,'PRICES','myfile.del',null,null,null);

from within Netbeans but can't find myfile.del

Bob M
 
Bob Matthews
Master Rancher
Posts: 594
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
have just tried the following from within a java program


It gets to 4, after connecting correctly and printing number of records in the Table PRICES
However, we don't get to 5 ???

Bob M
 
Bob Matthews
Master Rancher
Posts: 594
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Added another 2 question marks and it worked

Got the table PRICES data - all 202,000 records

Great!

Bob M
 
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic