- This topic has 26 replies, 2 voices, and was last updated 18 years, 5 months ago by
architect-01.
-
AuthorPosts
-
January 23, 2007 at 9:31 am #264987
Riyad KallaMemberPaul,
Sure, here are some steps:1) Download Derby from here: http://apache.mirrors.redwire.net/db/derby/db-derby-10.2.2.0/db-derby-10.2.2.0-bin.zip
2) Unzip the ZIP file somewhere, in my case, C:\Java (creates a subdir called: db-derby-10.2.2.0-bin)
3) Go back to MyEclipse, switch to the “MyEclipse Database Explorer” perspective
4) Click the “New connection” button
5) Name the profile “Local Derby Connection”
6) Click “Configure database driver”, click “New”, from the drop down select Derby, 2nd one down, down on the “Driver JAR” tab, click “Add…” go find the “derby.jar” file, mine is in C:\Java\db-derby-10.2.2.0-bin\lib), click it then hit OK.
7) Now click the drop down list next to “Driver classname” and select: org.apache.derby.jdbc.EmbeddedDriver
8) Hit OK, select Derby and hit OK again. Now notice that the driver on the connection screen should be “Derby”
9) Set the URL to “jdbc:derby:derbyDB;create=true” and leave everything else blank, hit Finish.
10) Now open the connection to Derby, you should be all set.January 23, 2007 at 9:55 am #264988
Riyad KallaMemberNote, I spruced this up a little, added some screenshots and made it part of our FAQ here:http://www.myeclipseide.com/index.php?name=PNphpBB2&file=viewtopic&p=71882#71882
January 23, 2007 at 10:33 am #264991
architect-01MemberHi Riyad,
Thanks so much for taking the time to do this. What we could really use is the same instructions only for persisting the data. See I have to demo this and want to show the data persisting.Thanks again
Paul
January 23, 2007 at 10:35 am #264992
Riyad KallaMemberPaul,
I don’t follow what you are asking… do you mean persisting the Derby information to the disk (check the Derby docs) or do you mean something else?January 23, 2007 at 11:05 am #265005
architect-01MemberRiyad,
When I create the tables + data, Next time I open the derby database I needed the data to be there. Will the Embedded driver save the Metadata + table data meaning actual info Name : John Smith to disk so when you exit MyEclipse and derby next time you connect to the DB the config and data will be there.Thanks
Paul
January 23, 2007 at 11:11 am #265006
Riyad KallaMemberPaul,
No. As mentioned in the FAQ none of this is saved because it’s setup as an embedded in-memory DB. If you want to use it as a real DB, check the Derby docs on how to set it up as a network server. Then it will behave like a local MySQL install or something more traditional.You will also need to change the JDBC driver you use to connect to it, by setting up a new Derby driver that uses the derbyclient.jar file, it contains the JDBC driver that can talk over the network to the running Derby server.
January 23, 2007 at 1:02 pm #265021
architect-01MemberHi Riyad,
It connected, now how do I edit data. I mean how can I insert data into the table I created MyEclipse. it will only let me query the data. There is no data in the table so I get an error if I try to return anything.Thanks
Paul
January 23, 2007 at 1:38 pm #265022
Riyad KallaMemberPaul,
Please see Section 5.4 in our DB Explorer document here:
http://www.myeclipseide.com/images/tutorials/quickstarts/dbexplorer/January 23, 2007 at 1:50 pm #265025
architect-01MemberRiyad,
So from what I am reading the DB Explorer can only edit exsisting data in a table. The tool cannot insert new rows into a table. Is that right ?Paul
January 23, 2007 at 2:05 pm #265027
Riyad KallaMemberPaul, you are correct. This is something we will likely be adding soon as we realize it’s a nice time saver.
January 23, 2007 at 3:31 pm #265036
architect-01MemberYou should add it, It would be, I guess I have to look for another plugin.
Thanks
January 24, 2007 at 4:44 pm #265087
architect-01MemberSuccess I connected using the Derby Eclipse plugin and was able to insert and update data. I had a conflict with my machine using localhost. My wireless IP and network connection IP are different.
Thanks fo all the help. Just wanted to let anyone new to Eclipse see my experience.Paul
-
AuthorPosts