LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 09-09-2009, 01:03 PM   #1
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,228
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
Talking Does this work?


Hi,

I'm (still) @ the same project - and am accessing a database...

The acces itself is ok, but I set up a DefaultTableModel to be transmitted over the network - the model is Serialised, so I assume this is ok.

Ik "shape" the model by first asdding cols to it:

Quote:
for(iCounter=0; iCounter<iColCount;iCounter++)
{
myU = new UHLDR();
myU = (UHLDR)alstFields.get(iCounter);
tcCol = new TableColumn();
tcCol.setIdentifier(myU.getID());
tcCol.setPreferredWidth(myU.getColW());
tcCol.setWidth(myU.getColW());
tcCol.setHeaderValue(myU.getColH());
modelR.addColumn(tcCol);
}
The holder "myU" has width and header as structural data from the base, these are all stored in an ArrayList.

After that, I run a second SQL to fill the model with data using addRow(vector);

Then, I'd like to send it over, the client gets a null ... hence my "cry 4 F1"...

So, in short:
- does it work to set up a model and send it over the "wire"
- can cols be added this way? (yes - I did this before, but for all the hair on my head, I dont know how I did that...)

Tnx!!

Thor
 
Old 09-09-2009, 01:30 PM   #2
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,228
Blog Entries: 23

Original Poster
Rep: Reputation: 279Reputation: 279Reputation: 279
Scrap this question - in one simple line: can a tablemodel (abstract, default, ...) be send over the network?

Of course my code fails, I add a col the wrong way, addColumn can only add a column with a NAME as param, not a colums in it whole...

Sorry about a dumm question...

Thor
 
Old 09-09-2009, 08:55 PM   #3
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,246

Rep: Reputation: 557Reputation: 557Reputation: 557Reputation: 557Reputation: 557Reputation: 557
Maybe this is a stupid question, but what if you'd use mysqldump to create a text file, send it over the network and read it back into MySQL?

Somehow I seem to remember that you were using PostgresQL (but I am too lazy to look it up), hopefully PostgresQL has a similair dump/restore function?

jlinkels
 
  


Reply

Tags
stuff


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS lookup doesn't work, ping, firefox will not work properly lovemov Linux - Networking 2 04-23-2009 03:30 PM
can't make ethernet on laptop work, wireless and usb work fine ubuntu 8.10 rz1988 Linux - Newbie 10 01-13-2009 03:21 PM
Getting a touch screen to work, must get PCI serial device to work first sternocera Linux - Hardware 2 10-03-2008 07:23 AM
I have AD authentication work, how do i make SSH PAM work in RHEL4? epmd Red Hat 0 09-19-2007 07:04 PM
FALCONS EYE (nethack) FAILS ON STARTUP, use to work, wont work even after reinstall roorings Linux - Software 0 10-08-2003 11:39 PM


All times are GMT -5. The time now is 08:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration