773 byte By
wei_mar at 2007-9-26 11:05:04
Hi,how can I convert an existing XML structure into a SQL string? It's important to do this manually, because there are additional data necessary to complete the recordset.The XML structure is:<File><Recordset> <Column>Data</Column> ...
I'm trying to connect to a db and isert into it some data. My source code is:for (int riga = 0; riga < numrighe; riga++){String querispondi = "INSERT INTO RISPOSTE (NUM_RISPOSTA, ID_OFFERTA, ID_RESA, ID_SPEDIZIONE, ID_PAGAMENTO, ID_VALUTA, NOTE_ATTREZZATURA, EV_CONDIZIONI, NOTE) VALUES ...
283 byte By
aldus99 at 2007-9-26 11:06:26
If I open a connection to the db in one JVM. Set the autocommit off and then pass the connection to another JVM (somehow) and on that JVM execute SQL statements and commit the connection. Can that work?If yes, then how can I pass the connection to the other JVM?
Hi, I need to use oracle's returning clause in the insert statement. But using a CallableStatement doesn't work:SqlStmt = con.prepareCall("insert into tst (description) values (?) returning id into ?");give this error:ORA-00439: feature not enabled: RETURNING clause from this client typeIs ...
529 byte By
t503229 at 2007-9-26 11:08:41
I'm new at this mysql stuff and can't seem to figure out how to write the code for querying the database for the number of rows in a table. I can get a connection to the database and have done some basic commands like SELECT * FROM TABLE using rs.next().Can somebody help me out with the java ...
775 byte By
e_kueh at 2007-9-26 11:08:45
I am using win 98, MS Access. I down loaded jdk1.3.This is my first sql using java. I keep getting the following error when compiling. I have add my datasource to system dsn as MyDsn.import java.sql.*;import sun.jdbc.odbc.JdbcOdbcDriver;class mysql {public static void main (String[] ...
hai,i have a doubt.how to insert and retrieve image file from sql server or any orher db.thanxinadvance.it is urgentplease tell me.byeyoursrajesh
454 byte By
kaluloo at 2007-9-26 11:09:24
Hi,I have written a select query in my java application. The database is DB2. It is returning me an error "Execution failed because of a distributed protocol error that will affect the successful execution of subsequent commands and SQL statements: Reason code "220E". SQLSTATE=58009".Anybody ...
418 byte By
Doshe at 2007-9-26 11:09:27
Hi!I really need to access a database file from access by selecting it in a JFileChooser...I can get my program to work fine by just configuring the file in the ODBC through Control Panel.Is there a way of loading the file directly in getConnection() method?Or can I change the "pointer" of a ...
313 byte By
X-Power at 2007-9-26 11:10:10
if I use Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); everything works ok!if use Class.forName("oracle.djbc.driver.OracleDriver"); the complier tell me class not found ..I have install Oracle on my machine ,,andyone can tell me how to load the Jdbc Oracle driver!! thanks in advance! ...
262 byte By
alexeyru at 2007-9-26 11:11:25
Hi!When I'm trying to connect to my Oracle database (under Windows 2000), I see this message, but when I ping the computer, where the database is, everything is OK and my network addapter works corectly!!! What should I do?Thank you
624 byte By
chenS at 2007-9-26 11:11:56
I have a little application that works fine when running on JBuilder. It (an applet) doesn't work for some reason on IE. The result is empty text fields. What 2 do?public DataHandler() {try {Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");} catch (ClassNotFoundException cnfe) {};try {con = ...
When I write a java program running in DOS, it can connect to database successfully, but when I change it to servlet program, the no class found error message appear again, why ?Thanks a lot..
834 byte By
ugtroy at 2007-9-26 11:13:32
Hi,I am new to working with JDBC and trying a few examples out. I have been successful with connecting to a database on my local machine where my Java code is located. I am using win2000 and the database is a simple one written in access. This is the code I use to connect to it:String url2 = ...
1174 byte By
m.bellec at 2007-9-26 11:13:44
Hi,I have a stored function that belongs to a package. This stored function returns a Oracle TABLE(array) of RECORDS.Now If I try to call the procedure through a callableSatement registering the returned type as a Types.ARRAY or OracleTypes.ARRAY I always got a type conflict ...
1405 byte By
aldus99 at 2007-9-26 11:13:54
I have 3 JVMs (a,b,c) of which JVM-a is the server JVM (say), the server JVM has a transaction manager that keeps tracks of all the local transactions, local connection pools and the resources (connections) it doles out to the other JVMs (b & c) which I call agents.Agents need resources ...
6342 byte By
heseir at 2007-9-26 11:14:43
I have a problem using jsp -> java-class -> mm.mysql -> mysql on a unix webserver.The server runs tomcat 3.2.3.Is there a special place I need to put mm.mysql.Classpaths?This example works fine on my win2000 laptop. That is why I don't understand a thing!! This is the output i get ...
I am thinking of obtaining a DataSource using JNDI lookup and cache it to be used by multiple threads (thus eliminating the need to do a JNDI lookup everytime).Each thread will do its own ds.getConnection() using this single instance of DataSource and close the connection after it is done with ...
304 byte By
engelbmj at 2007-9-26 11:15:05
I'm working with a product that uses a jdbc driver, but it isn' jdbc 2.0. It's an earlier version, although I'm not sure; probably the version before 2.0. I need to grab a subset of a resultset (all the rows, but only some of the columns). What's the easiest way of doing this? Thanks. ...
1392 byte By
nicolosd at 2007-9-26 11:15:44
Hello. I have an MS Access database set up with no actual tables in it. Instead, it has linked tables from a SQL Server database through an ODBC connection. There is one query written in the Access Database that pulls relevant data from each of these tables into a view. A login step is required ...
1136 byte By
isjm at 2007-9-26 11:15:48
Hi guys and gals. I've checked out other posts on this topic, but haven't found any decent answers. Hopefully someone can help me.I have a stored procedure:CREATE PROCEDURE GetLastAvalChildIDASDECLARE @isBusy INTSELECT @isBusy = busyFROM tblCountersSELECT Busy, NextAvaliableChildID FROM ...
1211 byte By
e_kueh at 2007-9-26 11:16:16
Can anyone help? I keep getting this error message.cannot resolve symbolsymbol : variable constatement stmt = con.createStatement ( );Here is my code. If you find anything else, please point it out to me. Thanks.import java.sql.*;class mysql {public static void main (String[ ] args) {String ...
376 byte By
rx3 at 2007-9-26 11:16:57
A newbie jdbc question. I want to retrieve column names of all the tables in my DB(Sybase) using getColumns(). But it seems to work with metadata- like rs.dbmd.getColumns(...). But i m not very clear if i have to always use metadata in all apps. Is there a way to get columns without metadata. ...
1887 byte By
ok_ifyou at 2007-9-26 11:17:37
I write a java example,but it can not runwho can tell me why?This is the code:import java.awt.*;import java.awt.event.*;import java.sql.*;import java.util.*;import javax.swing.*; public class blobtest{ public static void main(String[] args) { Blob blob; Connection con = null; PreparedStatement ...
1918 byte By
ok_ifyou at 2007-9-26 11:17:40
I write a java example,but it can not runwho can tell me why?This is the code:import java.awt.*;import java.awt.event.*;import java.sql.*;import java.util.*;import javax.swing.*; public class blobtest{ public static void main(String[] args) { Blob blob; Connection con = null; PreparedStatement ...
where can I get the detail description of sql exception?
955 byte By
andydel at 2007-9-26 11:19:51
Hope somebody can help. I am building my first java applet which connects to a database but I can't get around the permissions problem. I have included the following policy file in the same directry as my applet but still no joy. (To be honest I am guessing a bit as tutorials tend to give you ...
I have just compiled a program that tries to connect to a DB2 database in order to create a table with fields and values and to update these. It compiled fine but when I try to run it I get the following error: General exception occured java.sql.SQLException: No suitable driver at ...
408 byte By
Susan_B at 2007-9-26 11:20:42
I am trying to insert rows into an Oracle table remotely. The main DB and the remote DB are both Oracle, and we are connecting from the remote to the main DB through a private link. There is a private synonym on the remote DB. I can execute selects against the private synonym without issue. ...
2152 byte By
apw9899 at 2007-9-26 11:21:41
Hi, this is a similar problem to the Network Connection could not be established error that others have posted about, but slightly different and perhaps very much more troubling...First, our configuration. We have Websphere running on Novell Netware. We have Oracle 8i running on NT 4.0. We have ...
1707 byte By
e_kueh at 2007-9-26 11:22:48
Here is my code. I inserted 5 records, and only the first 4 gets to Access. If I commented out the second item, only 3 items got inserted to my MS Access.Why is it alway minus one ?import java.sql.*;class mysql {public static void main (String[ ] args) {String odbc = ...
1096 byte By
balarp at 2007-9-26 11:23:40
Hi,I am getting the following error message while connecting with the MySQL .(O/S :Sun OS 5.6)Error.....java.sql.SQLException: Invalid authorization specification: Access denied for user: 'some_user&password@localhost' (Using password: NO)Note that i have given all permission to the user ...
649 byte By
TomXu at 2007-9-26 11:24:13
I use jdbc:odbc to connect a dababase in MSSqlServer2000,(with no SP),If I pick the field in the table`s field order .it fine.if I pick the field value not in order ,a SQLException is thrown,it say there has no such field.Such as in the table :fields:name,old,cityin the classif I ...
145 byte By
peter_78 at 2007-9-26 11:25:03
hi people, can i get the list of system DSNs on a machine say NT, using java. if yes then how. regards,peter.
Connection and Statement are interfaces.Does DriverManager class gives implementations to these interfaces..?
1374 byte By
koem at 2007-9-26 11:25:55
Hi, I'm using a IBM DB2 v5.2.0 (on Win$/NT, Client too) and when I'm trying to create a Clob-Object (for writing to the DB later) I'm getting this Exception:java.lang.Exception: Invalid context for Blob or Clob: java.lang.UnsatisfiedLinkError: checkContextat ...
I get this error when i try to write a details field from a servlet to the memo field in my Access database. The memo field should be able to be up to 65,535 characters in length, but if i try to write more than about 300 characters it throws this sql exception:[Microsoft][ODBC Microsoft Access ...
Hii am using a Datasource to connect to a excel file and i am reading the fields like a database.one of the fields in excel are set to text, but the value of this field is 10when importing i use,String question_text = excelRs.getString(5);the value returned ends up with trailing zeros 10.0why ...
1361 byte By
dosteov at 2007-9-26 11:27:30
I have the following code which is calling a stored procedure:DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());conn = DriverManager.getConnection(connString, "MTAADM", "ADMMTA");String sql = "{call ACE_ALERTCOUNTS_SP(?,?,?,?,?,?,?)}";CallableStatement cs = ...
482 byte By
wk6pack at 2007-9-26 11:27:45
Hi,I'm trying to setup the driver to work on JRun, and I'm getting the following:The following error occurred while testing the data source connection:com.microsoft.jdbc.sqlserver.SQLServerDriverHere is the ...
599 byte By
jrabalai at 2007-9-26 11:27:51
I get an error when issuing an updateRow() after updateString("String Field", "Test"). My exception is:java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]String data, right truncationat sun.jdbc.odbc.JdbcOdbcResultSet.setPos(JdbcOdbcResultSet.java:5068)at ...
250 byte By
mahofman at 2007-9-26 11:27:54
Hi,I need to get all column names of all tables in a database.Ok i can get all table names with the DatabaseMetaData. But how can i get all column names of a table without executing a query on it?ThanksMarkus
953 byte By
bowsco at 2007-9-26 11:28:29
I have a Win98 m/c with Tomcat4.0.2 running. For this I have to set CLASSPATH=C:\jakarta-tomcat-4.0.2\common\lib\servlet.jar;. in the autoexec.bat - and all is fine.However I have just installed MySQL and the JDBC driver for MySQL - mm.mysql-2.0.4-bin.jar - which I've installed in the same ...
1481 byte By
yliu7 at 2007-9-26 11:28:31
Hi, guys:I have a database connection problem, and I want to ask help for you all! Thanks in advance!My database is Informix SE, which resides on another machine on the network(Unix). My computer is WinNT, I use JDK1.3, and I have Informix client SDK installed. I installed Informix 3.34 32-bit ...
199 byte By
ssagar at 2007-9-26 11:29:22
Has anyone ever implemented the "cancel" method on the Statement class in JDBC? On that has anyone cancelled the Connection or the Statement object while carrying out the cancel?
377 byte By
liinaa at 2007-9-26 11:31:03
I want to insert and retrieve a java class object into the database.Is this possible.Can setObject and getObject jdbc methods be used to achieve this and if so, what should be the corressponding datatype in the database If there's some other way of doing this, kindly pass on the ...
393 byte By
vvpatro at 2007-9-26 11:31:07
hello,Can anybody help in solving my problem ? I have a requirement as :There will be one PLSQL which should return a resultset (eg. select * from emp ). And i need to call that PLSQL from java. I don't know much about Oracle.So please can anybody help me out giving me an example of PLSQL and ...
I am having problems working with an oracle database. I am using Personal Oracle 8.0.The source code of my file is given here. The class is compiling and running and starting up the database. It is able to get a connection object from the drive but then it shows the following exception when I ...
2904 byte By
klleung at 2007-9-26 11:32:13
I am new to Java. I have tried to write a simple program insert table in Access2002. However, I got the following error,ERROR: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statementMy code is as follows,import java.lang.*;import java.sql.*;import java.util.*;import ...
I use jdbc to connect an oracle database.The client is running on WIN2000 system.the server running on SUN system.the code is this:Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();con = DriverManager.getConnection ...