Adott az alábbi program...
Minden szép és jóó csak nem látok semmilyen adatot, olyan mintha nem írná ki az adatokat a táblából.
Mi lehet a baj?
- 1269 megtekintés
Hozzászólások
Nem tudom beilleszteni a forráskódot...:(
-------------------------------------------
"Born with nothing, die with everything...."
- A hozzászóláshoz be kell jelentkezni
// EasyData --- Andras Vas (c) 2007
package easydata;
import java.io.*;
import java.sql.*;
class SQL_Connection {
private Connection conn;
private Statement stmt;
private ResultSet rs;
public String SearchText;
//Class.forName("jdbc.com.mysql.org");
public void GetSearchText() {
System.out.println("-----------K E R E S É S-----------");
try {
InputStreamReader stdin = new InputStreamReader(System.in);
BufferedReader console = new BufferedReader(stdin);
SearchText = console.readLine();
System.out.println("A keresett kifejezés: " + SearchText);
}
catch (IOException e) {
System.out.println(e.getMessage());
}
}
public void GetConnection() {
try {
conn = DriverManager.getConnection("jdbc://localhost:3306/test", "user", "passwd");
stmt = conn.createStatement();
System.out.println();
System.out.println();
System.out.println("Adatbázis kapcsolat....OK");
}
catch (SQLException e) {
System.out.println(e.getMessage());
}
}
- A hozzászóláshoz be kell jelentkezni
Forbidden
You don't have permission to access /comment/reply/35675/321101 on this server.
Zsííír :D
-------------------------------------------
"Born with nothing, die with everything...."
- A hozzászóláshoz be kell jelentkezni
Class.forName("com.mysql.jdbc.Driver") és az url "jdbc:mysql:"-lel kezdődik. Olvasgasd a manualt.
- A hozzászóláshoz be kell jelentkezni
Üdv
Ez szép és jóóó de kivételt nem dob....
Mind1 és Köszönöm
-------------------------------------------
"Born with nothing, die with everything...."
- A hozzászóláshoz be kell jelentkezni
nem is kell, nem arra valo a forum.
google://pastebin
t
- A hozzászóláshoz be kell jelentkezni