• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

help needed

 
Ranch Hand
Posts: 824
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all

I have a problem, which i want to discuss with all of u...

I dont know , It's the right place to post this question...

But it is somehow related to the database......


My problem is .......

<b> I have a swing JDBC application at one end..... and

on other end , i have another swing application......

I am using the oracle server for jdbc....

Now at one(my) side , i have a control button to upload

the table data from other side to my side.....

when i click on upload button.........My application

get connected to the the application at other side and

fetch the data from the oracle server that side and simply dump

the data into my oracle server.........


I dont know how to perform this ........

if any body can tell me the way to do this........

{Bear edit: removed 'urgent']
[ September 14, 2005: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you saying that you want to retrieve data from one Oracle DB and load it into another Oracle DB?
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First EaseUp

Your post semes to suggest you are trying to connect from one Swing application to another Swing application - is that correct? And what do you mean by "on the other side"? Do you have a client Swing application which connects to a server applciation (unlikely to be in Swing) which gives you access to the database? Or do you have two client side Swing applciations connecting to difference schemas? Can you elaborate?
 
Sunil Kumar Gupta
Ranch Hand
Posts: 824
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Roger and Paul

1.

I want to retrieve data from one Oracle DB and load it into
another Oracle DB

I am using swing application on both side.......

Application on one side is different from other side

only because one side has upload functionality.......

on clicking this upload button, application

simply connect to the application on other side

other side then take the data from local database server

and return back to the application( having upload button)

and then once i get the data, i can insert into my database

server

Am i clear to the point ???
 
Sunil Kumar Gupta
Ranch Hand
Posts: 824
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have to complete this project very soon

and i m not getting any idea guys
 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do you need swing on both sides? Can't you get this done with a simple application on either side? Even otherwise, it is enough you have a swing interface running on one side and an application on the other.

When the button is pressed, call a method on the other side (using RMI, or socket connectivity). This method will return an Object[][] that will contain the records you want. You can then insert them in the local DB.

If you can be a bit more clear with you requirements, you can expect more help.
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Again, EaseUp.

What you require is easiest accomplished by using the export and import tools supplied with Oracle, rather than writing your own. I'm still not sure what you mean by "other side" so I'm going to assume you have two client applications written in Swing. If that is the case, you need to write one which uses JDBC (or an ORM technology) to export the data in a known format (CSV perhaps, or as SQL INSERTS) to a text file(s) on the client machine. You will need to use java.sql.DatabaseMetaData to work out what tables exist, and export them accordingly. You will then have to write your other swing app which takes this file(s) and uses JDBC (or ORM) to import the data to the correct tables handling any differences between the schemas and logging errors.

But I have to point out again - its a big effort to replicate functionallity which comes with Oracle. I assume you have your reasons for doing it this way though.
 
Sunil Kumar Gupta
Ranch Hand
Posts: 824
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Paul, U r confused with the word "other side"...But what u r thinking

is right........I have two client application...

May be i m getting ur point....


One client application use the JDBC to export the data

into text file, and other client application pick this

file and import into database......

What is the best way to connect two swing applications

that resides on different locations

So that the whole transfer process run without

any problem.......
 
Sunil Kumar Gupta
Ranch Hand
Posts: 824
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi sravan

My problem is ......

My client want to do the query from the combined data from

all his sites...


Suppose we have three of four same applications running

on different locations...All these applications are storing

and retreiving the data from their local database server....

Now if i want to collect the information from all the locations

so that i can do the query from the combined data of all the locations..


what i want is , i simply tell my administration application the

location of remote application and he should transfer the whole data

of remote database server into the local database server


once i collect the information from all the sites .......

i can do the query and provide the combine result of

all the sites to the client....


I think it will help u to understand my real problem
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


What is the best way to connect two swing applications

that resides on different locations

So that the whole transfer process run without

any problem.......


Don't bother trying to "connect" the two apps. Just upload the generate text files to a server and run your import app. from there.
 
Sunil Kumar Gupta
Ranch Hand
Posts: 824
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But its two independent swing clients ........

I am not using any server in between
 
Sunil Kumar Gupta
Ranch Hand
Posts: 824
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Should i use a web server in between my applications ???
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sunil Kumar Gupta:
But its two independent swing clients ........

I am not using any server in between



If you want to use two stand-alone Swing apps which need to communicate with each other you will need to come up with a mechanism to allow them to do this. You might consider JMS. That would give you a central point to which every client application could send messages to and listen to messages from.

Originally posted by Sunil Kumar Gupta:
Should i use a web server in between my applications ???


You could create a web app which does this too. One client app could upload its data to a directory while the other polls the web server to see if any data has arrived.

That being said, if this data is intended to be shared between multiple client applications why are you using multiple schemas? Why not have every app connect to one schema? Saves a lot of work.
 
Sunil Kumar Gupta
Ranch Hand
Posts: 824
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Paul

I have no idea about JMS , I will try to check

it...

And in between i will also think the possibilities

to keep my data at single place...

Thanks again for ur valuable suggestion
 
Thanks tiny ad, for helping me escape the terrible comfort of this chair.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic