can you please teach a code on how to get a certain data from the access data base and store it in a variable in java?
Printable View
can you please teach a code on how to get a certain data from the access data base and store it in a variable in java?
Your question is extremely broad, and is in effect asking us to re-write full tutorials that have already been written. Rather than do that, why not Google for a tutorial on this, and try what the tutorial suggests? Then if you get stuck you can come back with a specific and answerable question about problems you are having.
Or if you've already gone through the tutorials and have a problem with your code, then please show us your code and ask a more specific question.
i want to display first the amount money that is stored in my database but i dont know how should i match it with the user that owns that amount in my database
can you give help me on that?
and this code dont gave me the output
Code java:b1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { try{ t1.setText(rs.getString("money")); } catch(Exception ex){} } });
Your question is too vague and missing too much information for me to be able to help you. Please consider that we have no clue as to what your program looks like or any aspect of your problem other than what you choose to show us. Put yourself in our shoes as you're formulating your question and ask yourself what information we'll need to fully understand your problem. Then please report back with more information that can help us help you. Luck.
sorry if my question is to vague. my knowledge in java is too narrow, iam planning to create a javabank base on my existing database. and ive just started my program. and now i am stuck on.my problem is that for example if i login in the system how can i retrieve the amount of money in that username.