aspose file tools*
The moose likes JDBC and the fly likes Vectors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Vectors" Watch "Vectors" New topic
Author

Vectors

steph rinert
Greenhorn

Joined: Oct 31, 2002
Posts: 7
Help,
I am using a vector to insert some data into a database but since a vector is wrapped in brackets, I do not get desired affects. Is there a way of inserting a vector into an Oracle DB without inserting the [] brackets thats comes with a vector.
Thanks
steph rinert
Greenhorn

Joined: Oct 31, 2002
Posts: 7
ohh and I wanted to insert the entire vector and not have to go though field by field.
Michael Zalewski
Ranch Hand

Joined: Apr 23, 2002
Posts: 168
If you are writing the Vector into a single column, single row in the database, you could always override the Vector.toString() method to get rid of the brackets:

You can also use the copy constructor just before you write to the database:

Aren't inner classes neat?
steph rinert
Greenhorn

Joined: Oct 31, 2002
Posts: 7
This worked great,
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Vectors