Torna indietro   Hardware Upgrade Forum > Software > Programmazione

PNY RTX 5080 Slim OC, sembra una Founders Edition ma non lo è
PNY RTX 5080 Slim OC, sembra una Founders Edition ma non lo è
La PNY GeForce RTX 5080 Slim OC si distingue nel panorama delle GPU di fascia alta per il design compatto a due slot, ispirato alla NVIDIA GeForce RTX 5080 Founders Edition. In questo test analizziamo comportamento termico e prestazioni in gioco, valutando se il formato ridotto comprometta o meno l'esperienza complessiva rispetto alle soluzioni più ingombranti presenti sul mercato.
Wi-Fi 7 con il design di una vetta innevata: ecco il nuovo sistema mesh di Huawei
Wi-Fi 7 con il design di una vetta innevata: ecco il nuovo sistema mesh di Huawei
HUAWEI WiFi Mesh X3 Pro Suite è probabilmente il router mesh più fotogenico che si possa acquistare oggi in Italia, ma dietro il guscio in acrilico trasparente e le luci LED dinamiche c'è una macchina tecnica costruita attorno allo standard Wi-Fi 7, con velocità teoriche Dual-Band fino a 3,6 Gbps e una copertura fino a 120 m² una volta abbinato il router principale all'extender incluso nel kit
Core Ultra 7 270K Plus e Core Ultra 7 250K Plus: Intel cerca il riscatto ma ci riesce in parte
Core Ultra 7 270K Plus e Core Ultra 7 250K Plus: Intel cerca il riscatto ma ci riesce in parte
Abbiamo provato le nuove CPU Intel Core Ultra 7 270K Plus e Core Ultra 7 250K Plus: più core e ottimizzazioni al funzionamento interno migliorano le prestazioni, anche in virtù di prezzi annunciati interessanti. A questo si aggiungono nuove ottimizzazioni software. Purtroppo, a fronte di prestazioni di calcolo elevate, il quadro rimane incerto nel gaming, dove l'andamento rimane altalenante. Infine, rimane il problema della piattaforma a fine vita.
Tutti gli articoli Tutte le news

Vai al Forum
Rispondi
 
Strumenti
Old 19-01-2011, 12:30   #1
salim
Member
 
Iscritto dal: Jul 2006
Messaggi: 54
[derby] la tabella creata non esiste

Ciao a tutti! Sto lavorando con derby e ho creato un file per la connessione al database e i metodi per eseguire le query. Vi posto il mio file:
Codice:
package YSQ2;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

class DB {
	
	private Connection conn = null;
	private Statement statement = null;
	
	public DB(){ //da controllare ancora se FUNZIONA!!!
		try{
			Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
			conn = DriverManager.getConnection("jdbc:derby:ysq;create=true");

			statement = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
		}
		catch (Exception ex) { 
			System.out.println("ciao "+ex.getMessage());
		}
		
		
	
	}//fine costruttore
	
	public ResultSet selectQuery(String query) {
		try {
			return statement.executeQuery(query);
		}
		catch(Exception e) {
			System.out.println("executeQuery: "); 
			e.printStackTrace();
			System.exit(0);
		}
		return null;
	}

	public int modQuery(String query) {
		try {
			return statement.executeUpdate(query);
		}
		catch(Exception e) {
			System.out.println("executeUpdate: "); 
			e.printStackTrace();
			System.exit(0);
		}
		return 0;
	}
	
	public void shutdown() {
		 try
         {
             // the shutdown=true attribute shuts down Derby
             DriverManager.getConnection("jdbc:derby:;shutdown=true");

             // To shut down a specific database only, but keep the
             // engine running (for example for connecting to other
             // databases), specify a database in the connection URL:
             //DriverManager.getConnection("jdbc:derby:" + dbName + ";shutdown=true");
         }
         catch (SQLException se)
         {
             if (( (se.getErrorCode() == 50000)
                     && ("XJ015".equals(se.getSQLState()) ))) {
                 // we got the expected exception
                 System.out.println("Derby shut down normally");
                 // Note that for single database shutdown, the expected
                 // SQL state is "08006", and the error code is 45000.
             } else {
                 // if the error code or SQLState is different, we have
                 // an unexpected exception (shutdown failed)
                 System.err.println("Derby did not shut down normally");
                 printSQLException(se);
             }
         }
	}

	public static void printSQLException(SQLException e)
    {
        // Unwraps the entire exception chain to unveil the real cause of the
        // Exception.
        while (e != null)
        {
            System.err.println("\n----- SQLException -----");
            System.err.println("  SQL State:  " + e.getSQLState());
            System.err.println("  Error Code: " + e.getErrorCode());
            System.err.println("  Message:    " + e.getMessage());
            // for stack traces, refer to derby.log or uncomment this:
            //e.printStackTrace(System.err);
            e = e.getNextException();
        }
    }
}
Poi richiamo questo file da un altro file e mi dice che la tabella non esiste anche se io da linea di comandi (ij) riesco a trovarla. Mi esce questo errore:
Codice:
java.sql.SQLSyntaxErrorException: Table/View 'PAZIENTE' does not exist.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(Unknown Source)
	at YSQ2.DB.selectQuery(DB.java:33)
	at YSQ2.SelezionaPaziente.initialize(SelezionaPaziente.java:71)
	at YSQ2.SelezionaPaziente.<init>(SelezionaPaziente.java:38)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at org.eclipse.ve.internal.java.vce.launcher.remotevm.JFCLauncher$1.run(JFCLauncher.java:59)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.sql.SQLException: Table/View 'PAZIENTE' does not exist.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
	... 24 more
Caused by: ERROR 42X05: Table/View 'PAZIENTE' does not exist.
	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
	at org.apache.derby.impl.sql.compile.FromBaseTable.bindTableDescriptor(Unknown Source)
	at org.apache.derby.impl.sql.compile.FromBaseTable.bindNonVTITables(Unknown Source)
	at org.apache.derby.impl.sql.compile.FromList.bindTables(Unknown Source)
	at org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(Unknown Source)
	at org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(Unknown Source)
	at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(Unknown Source)
	at org.apache.derby.impl.sql.compile.CursorNode.bindStatement(Unknown Source)
	at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
	at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
	... 18 more
salim è offline   Rispondi citando il messaggio o parte di esso
 Rispondi


PNY RTX 5080 Slim OC, sembra una Founders Edition ma non lo è PNY RTX 5080 Slim OC, sembra una Founders Editio...
Wi-Fi 7 con il design di una vetta innevata: ecco il nuovo sistema mesh di Huawei Wi-Fi 7 con il design di una vetta innevata: ecc...
Core Ultra 7 270K Plus e Core Ultra 7 250K Plus: Intel cerca il riscatto ma ci riesce in parte Core Ultra 7 270K Plus e Core Ultra 7 250K Plus:...
PC Specialist Lafité 14 AI AMD: assemblato come vuoi tu PC Specialist Lafité 14 AI AMD: assemblat...
Recensione Nothing Phone 4(a): sempre iconico ma ora più concreto Recensione Nothing Phone 4(a): sempre iconico ma...
Cloud in crescita, ma l’adozione dell’IA...
OpenAI cancella l'adult mode di ChatGPT:...
Google Search Live arriva in Italia: la ...
MacBook Air 15'' con chip M4 (2025) crol...
Ora è possibile trasferire file t...
Apple domina con il MacBook Neo: i lapto...
Arriva la nuova gamma di PC Dell Pro per...
DJI Avata 360: la recensione del primo d...
Il browser di Samsung arriva su Windows,...
I satelliti AI Sat Mini per i datacenter...
Project Sunrise: l'idea di Blue Origin p...
DJI Avata 360 ufficiale: due sensori da ...
Samsung Galaxy Watch8 Classic a 303€, ma...
AGCOM ordina i primi blocchi DNS di siti...
Google risolve il problema della memoria...
Chromium
GPU-Z
OCCT
LibreOffice Portable
Opera One Portable
Opera One 106
CCleaner Portable
CCleaner Standard
Cpu-Z
Driver NVIDIA GeForce 546.65 WHQL
SmartFTP
Trillian
Google Chrome Portable
Google Chrome 120
VirtualBox
Tutti gli articoli Tutte le news Tutti i download

Strumenti

Regole
Non Puoi aprire nuove discussioni
Non Puoi rispondere ai messaggi
Non Puoi allegare file
Non Puoi modificare i tuoi messaggi

Il codice vB è On
Le Faccine sono On
Il codice [IMG] è On
Il codice HTML è Off
Vai al Forum


Tutti gli orari sono GMT +1. Ora sono le: 17:36.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Served by www3v