JDBC concurrency through threads.

562 byte By tdelenikas at 2007-9-26 4:16:56
Hi Everybody,Let's assume that I have an application with two (or more threads) and <one> database connection. What will happen if my threads try to execute some databace statements (i.e. update, insert, etc) through the <one and only> database connection at the <same> time? ...

free TDS with sql server problem

398 byte By parul_patidar at 2007-9-26 4:17:13
hi has any one used free tds i am facing problem using it.in my code at lineConnection con=DriverManager.getConnection("jdbc:freetds:sqlserver://server1/Northwind;user=sa;password=;");i get Exception- java.lang.NullPointerExceptionjava.sql.SQLExceptioncan anyone help me with thisi have set ...

Applet trying to connect to Oracle DB

3285 byte By saad_tawwab at 2007-9-26 4:19:21
Hello! I am trying to access an Oracle 8i database from an Applet. The problem is that the following exception is reported in IE 5.5 and the Applet is not run. exception: com.ms.security.SecurityEceptionEx[oracle/net/nt/TcpNTAdpater.connect]:cannot access "pc38" (where my database is being ...

how to access

101 byte By samreengul at 2007-9-26 4:19:22
hihow can i establish connection to database on the basis of password bye

Problem with JDBC

348 byte By fastzone at 2007-9-26 4:19:36
Hi all, I'm new to this JDBC thing, I was told to write an applet that can access the DB, but I kept having this error message show to me.sql.SQL.Exception:[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.does anyone know what's wrong, it is the insert statement or ...

how to inser data in database through programming

166 byte By samreengul at 2007-9-26 4:19:54
hiif some one try to insert data directly in the data base that was displayed through programming then how can database will be updatedbye

P-R-O-B-L-E-M with JDBC thin driver

1843 byte By javatroy at 2007-9-26 4:21:37
Thank you gmagana!I did not manage to make this code connect to Oracle at all:import java.sql.*; public class jdbcThin {public static void connect() {Stringurl = "jdbc:oracle:thin:uName/passW@myDatabase:1521:orcl";try {Class.forName ("oracle.jdbc.driver.OracleDriver"); Connection conn = ...

when to close the database

505 byte By chungyan5 at 2007-9-26 4:22:10
dear all i have tried to write a few jsp, they all connect to database using jdbc. So i have a question that when i create the 1st and connect to database, next 2nd, 3rd ... pages to work with database, last page should close the database. However, if user just open 1st, then 2nd and so on, ...

schema reading from database

615 byte By maneshsankar at 2007-9-26 4:22:24
Guys, I need to read the schema from a database. How do I do that? I connect to that database with a schema ID.. most probably with admin profile.. and then what do i do next? I found something like getSchemas(); getCatalogs(); etc etc What I could figure out is as follows get ...

is this approach ok

276 byte By payal_sharma at 2007-9-26 4:23:20
I have got 14 rows in each resultset and 50 values in each row. I am getting all values of from resultset in to array.And then adding all the array to a vector. And then returning the vector with a method.Is this approach is ok .payal

value not found

251 byte By payal_sharma at 2007-9-26 4:23:31
Dear java guru'sIf I use String s1=rs.getString(3);....getting all the other row values I again useString s2=rs.getString(3);then it is taking null value in s2 why?thanks in advance payal sharma

A Basic Question

525 byte By javanewcomer at 2007-9-26 4:25:00
Connection con=DriverManager.getConnection(url,user,pwd);con.createStatement();Because "Connection" is an interface but method- "DriverManager.getConnection()" can return an instance of Connection.As I know, an interface can not be instantialized.Why it is valid to do so.And "createStatement ...

Another Question About How To Use PointBase Dbms

1594 byte By javanewcomer at 2007-9-26 4:25:01
hi all,another question is about PointBase DataBase.I use the following source to test it. It comiles correctly,but when i test it with an argument of database name. JVM tell me that ClassDefNotFound.It seems that JVM can not find "com.pointbase.jdbc.jdbcDriver" as the documentation told.I have ...

Accessing an Excel sheet from a java application

1535 byte By EngMarwan at 2007-9-26 4:25:04
Hello Sir,I face a peoblem in writing data from a java application to an Excel Sheet. I've made an ODBC connection with the excel sheet and I wrote a java application to insert some data to that sheet via the ODBC driver but it doesn't wrok. The "INSERT..." and "UPDATE.." statements doesn't ...

very basic jdbc qu from newbie

638 byte By 888777666 at 2007-9-26 4:25:13
hi, I am using a W98 platform and want to use Access dbases... Under FFJ 2.0 I set up a link using a rather complicated process involving a third party driver and an MS-DOS console which had to run the driver at the same time as the java prog.In FFJ 3.0 I see there's all this nice-looking DB ...

Problems inserting EBCDIC characters into Oracle db using WebLogic Pool

292 byte By ranguera at 2007-9-26 4:26:03
I am having problems when inserting or updating data into an Oracle varchar2 through a Bea WebLogic pool using a preparedStatement. The thing is that when I tried it without using the pool I get the EBCDIC characters updated but when I use the pool I miss them, any help?

How do I get constarints of a table?

517 byte By aboonetlink1 at 2007-9-26 4:27:31
Hi all,Here is a requirement for me in JDBC. How do i get the information about the constraints of a table by using JDBC API?I can get the Primary Keys , Foreign Keys by using DataBaseMetaData. But i am not able to get the Checked constraints, Unique Key Constaints and all.Please help me on ...

Oracle Thin Driver

373 byte By msyal at 2007-9-26 4:27:35
I want to use Oracle Thin Driver for database connectivityDoes the license of Thin Driver comes with Oracle or I have to purchase it seperatelyAlso how many connections does this driver support. Is there any default max. no of connection set in Oracle for connection. I want to implement ...

Firewall: Error sending to the socket, server is not responding.

904 byte By vissi at 2007-9-26 4:28:35
Hi all, I'm trying to connect AIX machine to NT DB2 Database through JDBC with a firewall. I'm using the standard port 6789 in JDBC Applet Server in NT DB2. But I've gotten the following message:COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0614E Error sending to the socket, server is ...

Result set problem

255 byte By relat at 2007-9-26 4:28:59
I am trying to store the records in a resultset i.e.; give stmt.executeQuery("select * from table") from oracle i got SQLException : Invalid cursor state exception. but i can update and insert records in this case .thanks for any help

java.sql.Dates!!!!

159 byte By wickm at 2007-9-26 4:29:00
Facing problem while converting java.util.Dates to java.sql.Dates. how to do proper way to do this or can some one provide proper documentation?

java.sql.SQLException

993 byte By frant at 2007-9-26 4:29:07
My program is compiling correctly with out any errors. when i try to run it this error occurred : java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error inINSERT INTO statement.at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)at ...

Table in Oracle 7.3

297 byte By babaler at 2007-9-26 4:30:22
I need to define a table data type, and access it from my java program with an ArrayDescriptor.The only way I know of to define this kind of table is in a package. When I try to construct the ArrayDescriptor using "package.table_type" I get an exception.How do I do it?

How to import lotus.jdbc.domino.*

241 byte By mirandaedward at 2007-9-26 4:30:29
Hi, All,when I have my serlvet codes import lotus.jdbc.domino.*;I got the message "Import refers to a missing package: lotus.jdbc.domino.*", what can I do to get this?Thanks in advance.Miranda

Oracle and Java

205 byte By sandeep_saluja at 2007-9-26 4:30:51
HiIs there anyway by which i can store my java class inside the oracle database.If anyone has a iota of idea about this then please share it with me.Thanks Sandeep Saluja

User problem with store procedure call

480 byte By ambarj at 2007-9-26 4:31:39
I have a stored procedure which returns the ref cursor. If I connect as the package owner say x I can execute the procedure and get the resultset easily. However if I login as the user y, which has the execute permission on the package I get java.sql.sqlexception (ora-00942). I can execute the ...

Column Not Found

297 byte By qasims_1 at 2007-9-26 4:32:11
I am writting this simple code to get the maximum no of value from a column.The code is ResultSet = statement.executeQuery("SELECT MAX(column-name) FROM Table ");but tomcat is showing me an error thatColumn Not FoundWhat is wrong here

getting some values from the table

164 byte By qasims_1 at 2007-9-26 4:32:21
what is wrong with this rs = statement.executeQuery("SELECT * MAX(COLUM) FROM Table");I am getting message Column Not Found

Handling Exceptions in batchUpdates

581 byte By mgandham at 2007-9-26 4:32:32
Hi Everybody, I am using batchUpdates(i.e, using executeBatch()) to update our database. i am getting a single Exception message when my batch fails ( ofcourse, i will also get updateCounts from the BatchUpdateException , with which i can find out which statements are successful and which are ...

SQL Exception while connecting to DB2 UDB from a Java application

521 byte By bala_r2 at 2007-9-26 4:32:45
Hi,I downloaded and installed the DB2 client and I am using the driver "COM.ibm.db2.jdbc.net.DB2Driver". I use this to connect to a DB2 UDB server (running on AIX) from a Java application running on Solaris. I get the following error:COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0616E ...

How to access a DSNless remote MS-ACCESS DB ?

778 byte By nandakrs at 2007-9-26 4:33:40
I have tried this with local system and working fine.String conString="jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};SERVER=myserver;DBQ=c:\\my.mdb";I think here the SERVER is dummy. Even without SERVER its working fine with local system.But assume the 'my.mdb' DB is in remote ...

Can not Insert data to Microsoft Access successfully

283 byte By ybxr at 2007-9-26 4:34:14
I am using Microsoft Access database, and trying to insert some data into a table with a "while" loop, but every time, the last row can not be inserted although the return value of the "executeUpdate()" is 1, can anyone tell what's wrong with that? thank you very much

JDBC MS SQLServer Driver Level 4 (Free), anyone?

201 byte By rodolfodc at 2007-9-26 4:34:29
Hi everyone!I'm developing a system using MS SQLServer 2000. I can't find any SQL driver Level 4 for free.Does anyone know about a free driver.Thanks,Rodolfo

HELP!? SQLException: Invalid handle

3771 byte By diffservhk at 2007-9-26 4:34:52
Hi friends,I am facing a problem in my program with ODBC-SQL Server 2000.The program originally ran smooth with one SELECT statement. But I modified the class and added a method with a new SELECT statement, the error appears.The old SELECT statement works but the new one gives the error. What ...

Problem with slow DB-connection

1020 byte By d97thorn at 2007-9-26 4:34:56
I have a java-program working with an mdb-database. The database consists of about 1500-2000 rows and with all these rows, the program has begun to work very slowly. Now I will try to close ResultSets, Statements and connections. However, it seems to take a long time to establish a connection ...

How to using Servlet to connect to MS SQL Server with DSN?

264 byte By galaxia at 2007-9-26 4:35:00
Dear all,A want to sue servlet to connect to MS SQL server 2000 with DSN, how to code it? Help me please, i'm just a beginner to use java to develop application, hope that i can have your reply soon, as it's really quite urgentGalaxia

jdbc-applet

3055 byte By Mussarat at 2007-9-26 4:36:24
hi!i have connected MS Access database with Applet using JDBC it is is working fine and there is no error when running in appletviewer but if i am running this in Internet Explorer it is not accessing database and also it is not showing any error. my code is:import java.applet.Applet;import ...

Connection Pool and Oracle

3418 byte By jericd at 2007-9-26 4:38:41
I've implemented my own connection pool and am using the Oracle Thin driver. What I want to do is limit the number of connections, I don't want to just create a new connection if the pool is full, like the standard connection pool. The problem is that I am getting orphaned sessions perhaps ...

restrict table names from DatabaseMetaData to those owned by connected user

182 byte By kdua1 at 2007-9-26 4:40:01
I need to get table names from a database but only those that are accessible to the connected user. Is there any way to do that, not necessarily using DatabaseMetaData.

Storing image binary vs. storing URL in database

233 byte By thunderBolt at 2007-9-26 4:40:05
hi experts, What are the benefits of storing the binary data of an image or an audio file in the database? Would it be much faster if I store the URL string to the file instead?Thanks.

ResultSet to Table

818 byte By jayd23 at 2007-9-26 4:40:29
Hi..I'm connecting to a SQL Server 2000 database using a type 4 JDBC driver.I have a table containing over 1.6 million rows(8 fields).One of the tasks of my application is to sort this huge table on the basis of two fields and group the rows in ascending order...the query takes abt 2.5 minutes ...

LIKE clause with special characters

354 byte By sravikumar1 at 2007-9-26 4:40:37
Hi All,I'm having problems with LIKE clause that contain special characters.I'm doing something likeSELECT * FROM Table WHERE FieldName LIKE '%10' & Chr(37) & '%'But it doesnt seem to recognize the pattern as 10%. Instead it is returning all the hits for 10?Help much ...

callable statement

735 byte By pandee at 2007-9-26 4:42:14
hi all, I am using JDBC to connect to Oracle 8.1.5 database. In my program, I had a sentence:CallableStatement cstmta=conna.prepareCall("begin selectall(?); end;");It use a callablestatement to call a stored procedure-selectall.The procedure for selectall is:create or replace procedure ...

rows

185 byte By closed at 2007-9-26 4:42:19
hi i want ti know how to get count of rows which match a specific criteria from a database.i donot want to use a counter inside a while(next()) loop ?

Initializing Vector with ResultSet(too Slow!)

227 byte By Dustin at 2007-9-26 4:44:49
HiI'm createing a JTable with two Vectors. Im am initializing the Vectors in a while loop, but it is way to slow with large ResultSets.Does anyone know how I can speed this process up?Thanks!

Use a Ms Access Driver from another computer

228 byte By javapperrin at 2007-9-26 4:45:00
Hello, i'm trying to use a MS Access Driver from another computer in order to avoid to install this driver on all the computers and for some other reasons ...How can I do it ...Thanks.

JDBC + Oracle 8.1.5

766 byte By pptemp5 at 2007-9-26 4:45:03
Hi, I'm trying to connect to an Oracle database. I have installed Net8 etc from the Oracle 8i installation cd. This installation included the jdbc drivers, which it put in ORACLE_HOME\jdbc\lib\classes111.zip. I configured Net8 and tested it. I then added the classes111.zip file to the my ...

Transaction with Oracle & MQSeries

751 byte By stiffanneau at 2007-9-26 4:45:14
Hi all,I'm now working on a J2EE application that interacts with MQSeries 5.1 and Oracle 8.1.6. I have to handle transactions from my Java components for operations like described below :1. Open a transaction2. Read a message in an MQSeries queue3. Translate the message into DB instructions4. ...

getting results from a ResultSet, where two fields have the same name

831 byte By 011576303 at 2007-9-26 4:45:16
Hello!I am running a query (getting data from a few tables). two of the fields have the same name, such as in:"select a.c, b.c from a, b"then when I use the code:ResultSet.getString("a");it doesn't work.do you have any ideas until here?I thought of using the method this ...

MySQL Implementation

379 byte By khiz_eng at 2007-9-26 4:46:20
Hi to everyone,I need to proceed using MySQL Server with java implementation, my job is i must use MySQL with JDBC interface with java for information retrieval and insertion.AS i am using this for the first time .Furnish me with information and with examples as soon as possible.Thanx in ...