0

hi everyone

i have not been here in a while. so here I am practicing building a forensic managment java application but the thing, i am trying to connect to the database, so, like i am importing the codes that would help connect to the database, like I mean the connection, the preparedstatement and the resultset and for some reason am getting errors, is it because that java is not finding the it or wat.

the errors stating that it cannot find the symbol, I am only importing.

4
Contributors
24
Replies
54
Views
1 Month
Discussion Span
Last Post by jwenting
Featured Replies
  • Hi divinity02 You know me. We have worked together many times. But this time I agree with the previous posts. You haven’t given anywhere near enough information that we could possibly use to help you. Please try again with actual code, error message etc. JC Read More

  • I was referring to JavaME - the micro edition of a Java, because I don’t think that has sql as standard. Apart from that all I can guess is some kind of configuration or installation problem. Do you have any other code in the same IDE that successfully imports any … Read More

  • 1

    Looks to me like he's running against JavaSE compact1 profile, which doesn't have JDBC (along with quite a few other things). https://netbeans.org/kb/docs/java/javase-jdk8.html Netbeans can indeed now switch profiles in the IDE, maybe he did that inadvertently. http://www.oracle.com/technetwork/java/embedded/embedded-se/documentation/compact-profiles-overview-2157132.html Read More

0

rproffitt
what is wrong with my question, i have seen question asked worst than mine and it was answered and yes I did check to see if there was any questions that may be pertaining to mine but I didnt see any hence the reason for asking if my question wasnt good enough to warrant an answer then sorry

0

@d, it's incredibly hard to troubleshoot without seeing the code and the error messages from that line of code. Rather than me write at length how to make a better post, I supplied a link to where pritaeas wrote about everything that is needed to get working on a problem.

Add most detail using pritaeas's guide so others can see the code and maybe it's a simple thing.

2

Hi divinity02
You know me. We have worked together many times. But this time I agree with the previous posts. You haven’t given anywhere near enough information that we could possibly use to help you. Please try again with actual code, error message etc.

JC

0

hi james and rproffitt

here is the code

package forensic;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.swing.*;

/**
 *
 * @author luana taylor
 */
public class forensic_login extends javax.swing.JFrame {
Connection conn = null;
PreparedStatement pst = null;
ResultSet rs = null;

    /**

the errors that I am getting is that it cannot find symbol

I have now starting to build the login gui page, I want it to hook up to the database, so when there is a login it can say you are login successfully or invalid login

0

hey jc

i have upload the file for you to see where the error, is it called screenshot, all the errors are there and the error message says, it cannot find symbol the red lines underneath
Connection
ResultSet
PreparedStatement

that is the error,

Attachments Screenshot_2018-08-17_07_29_12.png 527.01 KB
0

hi james

yes it is java am using, i have not starting using any other languages, or have learned any other languages as yet

1

I was referring to JavaME - the micro edition of a Java, because I don’t think that has sql as standard. Apart from that all I can guess is some kind of configuration or installation problem. Do you have any other code in the same IDE that successfully imports any Java.sql files?

0

yes i have other program that I am currently working on and it doesnt have that problem,

0

javame is what" is that another software where u can write programs or is it an upgraded version

0

hi james

if I download the javame edition, seeing that it is the upgrade to the one that I hve which is 2.5.2 which is the old versio, will it over ride that one that I have at present or will it be just be separate

0

Java micro edition is a cut-down version of Java to run on very small computers. If you are writing for a pc or a server then it’s not relevant. I only mentioned it because it would explain your problem. But no.
Now all I can guess is that it’s a configuration or installation problem of some sort. Sorry I can’t be more helpful.

0

@JamesCherrill. 1.8 wasn't on that list so I wonder if such an old version has support for their imports. I think a conversation I had long ago cut off any support for Java prior to 8.0.

0

hi james and rprofiitt

there version of netbeans that i am using is version 8.2

0

Netbeans is the IDE and is 8.2
The JDK (Java Development Kit) version looks to be 1.8. May want to see about fixing that unless there is a reason you are using this such as for some embedded system or legacy reason.

PS. Please answer questions put to you such as "Do you have any other code in the same IDE that successfully imports any Java.sql files?"

Edited by rproffitt: Added PS.

0

yes I have said so before like u didnt read, i have successfully import java sql before and had no problems with importing it

0

Java 1.8 is perfectly ok, it’s also known as Java 8. It’s the current LTS version.
They changed the version numbers for marketing use after 1.4, but the version numbers in the actual code kept the original numbering scheme.
Netbeans 8.2 is also ok.
This is still a mystery!

Edited by JamesCherrill

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.