Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,738 members, 7,817,030 topics. Date: Friday, 03 May 2024 at 11:58 PM

Help! Problem With Java Derby - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Help! Problem With Java Derby (1819 Views)

Learning To Program With Java by the Fulaman / Help!!! Problem Installing Netbeans Ide / PHP Help: Problem With Database Output Display (2) (3) (4)

(1) (Reply) (Go Down)

Help! Problem With Java Derby by jboy01(m): 11:13am On Nov 28, 2013
I have been using mysql but decise to start using java derby for my desktop app.
I have created the database , the table and the derby.jar is in the library folder.
I write a loggin code to connect to login_table in the database, but the error I always receive is
Table/view "login_table" does not exist. Pls what is d cause d problem?
Re: Help! Problem With Java Derby by naijaswag1: 6:20pm On Nov 28, 2013
If you had pasted your code here, maybe it will be easier for folks to deal with your problem spot on. However, I will assume that you have written your code correctly, the bug might be ambiguous statement in assessing your table. Remember that you create a schema in your mysql before filling it database objects. So when accessing an object in a schema, affix the schema name. What I mean is that your "login_table" should explicitly have the schema name in the statement. Example: school.login_table. Now if you are using persistence frameworks, you set this property in the xml persistence file. What you are basically telling your jdbc driver is to go to that particular schema and find that table. At this point it must exist.

Comprehende?
Re: Help! Problem With Java Derby by jboy01(m): 9:19pm On Nov 28, 2013
naija_swag: If you had pasted your code here, maybe it will be easier for folks to deal with your problem spot on. However, I will assume that you have written your code correctly, the bug might be ambiguous statement in assessing your table. Remember that you create a schema in your mysql before filling it database objects. So when accessing an object in a schema, affix the schema name. What I mean is that your "login_table" should explicitly have the schema name in the statement. Example: school.login_table. Now if you are using persistence frameworks, you set this property in the xml persistence file. What you are basically telling your jdbc driver is to go to that particular schema and find that table. At this point it must exist.

Comprehende?
I have it, but it is showing the same error.

Table/View 'APP.LOGIN_TABLE' does not exist

My schema is APP.
Re: Help! Problem With Java Derby by jboy01(m): 10:28pm On Nov 28, 2013
The correct one is app."Login_table".
But the problem is how will I put app."login_table" in the SELECT command with the doble quote.
i.e app."login_table"
Re: Help! Problem With Java Derby by javadoctor(m): 7:18am On Nov 29, 2013
Program never lies, if It can't see ur table its because u re prolly using an iDE like netbeans dat creates the database its pointing to in ur C:\, all u nid to do is copy the one in ur C to ur project and replace the folder. This shld work
Re: Help! Problem With Java Derby by naijaswag1: 11:24am On Nov 29, 2013
Paste your code here to make things easier for folks to debug and help you. The app.login_table refers to the table. You Don't enclose the table name and leave out the schema. Use escape character to put the quotation marks
Re: Help! Problem With Java Derby by jboy01(m): 11:34am On Nov 29, 2013
naija_swag: Paste your code here to make things easier for folks to debug and help you. The app.login_table refers to the table. You Don't enclose the table name and leave out the schema. Use escape character to put the quotation marks

Thank I have gotten the solution,
It will be this form
App.\"login_table\"
Re: Help! Problem With Java Derby by Danyl(m): 10:21pm On Dec 02, 2013
jboy01:
Thank I have gotten the solution,
It will be this form
App.\"login_table\"
it cant b like dat brother. if u r using jdbc transactions statements u should use APP.login_table if login table is ur database table u r 'selecting' from. remove dos quotes. n btw u hvnt posted ur codes here for ppl to c wer u got it wrong n for ur information if u get it ryt, n u r using netbeans it might still not retrieve anything into d resultset object but it will later on as u try it. I hv experienced dis many times but it works eventually.
Re: Help! Problem With Java Derby by jboy01(m): 1:46pm On Dec 04, 2013
Danyl:
it cant b like dat brother. if u r using jdbc transactions statements u should use APP.login_table if login table is ur database table u r 'selecting' from. remove dos quotes. n btw u hvnt posted ur codes here for ppl to c wer u got it wrong n for ur information if u get it ryt, n u r using netbeans it might still not retrieve anything into d resultset object but it will later on as u try it. I hv experienced dis many times but it works eventually.
Thank bro! It does work for me that way. I tried the APP.login_table but it did not work. It only work when I put it as APP."Login_table" . So the code will be like this

Statement = "SELECT * FROM APP.\"login_table\" WHERE ......" .
Re: Help! Problem With Java Derby by juliuas: 3:09am On Aug 29, 2014
here is an easy solution to that prob "table doesn't exist"

I'm using win 8.1 enterprise , netbeans 8.0, jdk 7u67

just copy the database folder from C:\Users\"username"\.netbeans-derby\

to your project folder in netbeans project folder directory

same can be done for eclipse.
smiley

(1) (Reply)

Journey To Full Stack Developer / Connecting An Offline Server To An Online Server / Ruby Vs Python

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 18
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.