138 byte By
anithi78 at 2007-9-26 3:14:30
When I execute a "select" statement, I want to know how many rows it fetches from the database.How do I do it?
1433 byte By
diarmaid at 2007-9-26 3:14:51
Hi all.This issue is regarding the use of the JTA with Oracle. I discoveredthere was a lack of support for JTA in Oracle 8.1.5 and then foundthat their documentation now claims that JTA is supported in 8.1.6 andabove.I have written my own implementations of Transaction,TransactionManager, Xid, ...
Hi, I have a question for some of you Java specialists out there. I want to execute a select statment in my database (SQL Server 2000) and store the output in a variable. - The reason I am not directly executing the SQL statement from my JDBC connection is that I need to execute a number of SQL ...
225 byte By
ConlonP at 2007-9-26 3:17:14
I'm currently writing a program to interface with a 200MB database. The program has to connect to just a file, no server can be involved. Is there a JDBC driver to connect to an access file? just the .mdb file.
You know we use the next() method to read the rows from the result set after we execute our query using JDBC. What I found was that when I execute next(), the first row is fetched and stored in the resultset variable you define. I want to know if there is a way to putthe data back and when I do ...
Hi folks,There's a guy in my department who's trying to get to grips with JSPs and JDBC. He's written a test JSP accessing an Access database via the JDBC-ODBC bridge, but when he tries to run it, he gets an SQLException with the not very helpful error "general error".The basic code is ...
888 byte By
dUb at 2007-9-26 3:18:32
I have a servlet and I am trying to implement a form in the page so that it will submit from a text box a string into the database. Here is my code.java.util.Date d = new java.util.Date();java.sql.Timestamp t = new java.sql.Timestamp(d.getTime());String data = "";out.println("<form ...
I have an Access D-base thats of arbitary length.I need to know the number of rows in a table named Datelist.I could do a generic counter using the .next method but figure there is a much easier way.Each row will be read into an array ... thats why I need the length.Thanks in advance.B~ ...
How to update the latest record?for instance:UPDATE ATABEL SET STATUS='TRUE' WHERE EVENTID='IEOE93' AND TIME= try to find the latest record to update anyone can kindly help? thanks
577 byte By
gpadmaja at 2007-9-26 3:20:04
I am creating statement like this:myStmt1=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);dbRs1 = myStmt1.executeQuery(sql);sql (select query) is returning zero rows if executed in query analyzer.but in my code if I check if(rs.next()) it is returning true even ...
4768 byte By
nicolas9 at 2007-9-26 3:21:04
Hello everybody,Sorry for my english but i'm french.I try to make a servlet with a post method in which a request to the database is made.Here are the servlet, the html and the error returned : SERVLETimport java.io.*;import javax.servlet.*;import javax.servlet.http.*;import java.util.*;import ...
358 byte By
jzaskar at 2007-9-26 3:21:13
There appears to be a limit to the number of parameters you can pass into a prepared statement.If I try and define more than 54, i get an error of "The number of parameter values set or registered does not match the number of parameters." ... even though they clearly do.Has anyone else ...
1279 byte By
Mussarat at 2007-9-26 3:21:22
i have connected ms Access database in java application it is working fine but when i converted it into applet it is not detecting database. the necessary code is imsah is the name of the database and employees is the name of table in which there are two variables fname and lname. problem is ...
589 byte By
Kamandi at 2007-9-26 3:22:28
Hi All,I have used sun jdbc2odbc for connecting to SqlServr database,But I have some problem with it.When i use resultset for reteiving data from one table,that table will be locked and i cant use another resultset for retreiving data from that table simultancely,in other word I cant use ...
212 byte By
satishs at 2007-9-26 3:22:58
I am using JSP and Access97. I need to compare the java.sql.Date type with the Date/Time in the Database. How can I run a query to find the dates after a particular date or before a particular date.
I am trying to insert one table data to another table. But if the second table is empty it is giving a runtime error that "before start of resultset". How to rectify that? In my condition I gave to insert into the table if first table id is not equal to second table id and if the count(*) is ...
156 byte By
CHEERS at 2007-9-26 3:25:45
Does anyone know of a way in which I can prevent the character " from being in any of the columns within my database table?Please help?
282 byte By
jaquest at 2007-9-26 3:27:38
I get "java.sql.SQLException No suitable driver" when trying to import a schema from a DB2 (V.5.2) database(VisualAge for Java Enterprise. 3.5 for Win). Before I added the zip file with DB2 drivers to the Workspace classpath. How I can fix it?Thanks in advance.
Hello all,I followed all instructions for setting up the driver and url. However, I still got the error message as the subject. My case is that:The ejb which tries to connect to a database run on one machine, while the database is on another. I copied runtime.zip, db2java.zip, sqlj.zip and ...
104 byte By
amnonm at 2007-9-26 3:28:51
I am using mysql am I want to backup my data.what is mysql propriate way to do it ?
230 byte By
sasus at 2007-9-26 3:29:08
hi all, I am facing a NullPointerException when executing:stmt.executeUpdate("INSERT INTO PEOPLE (PRI,LOGIN_TYPE) VALUES ('21','2004')");in my code.any suggestion please.
107 byte By
amtanoli at 2007-9-26 3:30:06
i am using the driver classes111.zip, how can i find the package oracle.sql?amt
Hi,I have the following problem: When I try to insert values to a db2 table with a batch update, something goes wrong during preparedStatement.executeBatch(), the follow Exception is thrown: java.lang.UnsatisfiedLinkError: SQLBindStringArray at ...
Hi,I am using execute(), getMoreResults() and getResultSet() methods to call sybase stored proc. It is working fine when calling a simple stored proc. But it is giving following error when this stored proc calls another stored proc inside it.<<Error connecting: ...
2727 byte By
bsnlrt at 2007-9-26 3:31:36
I'm trying to execute this query with jdbc on oracle:INSERT INTO BFD_SHOP (ID_SHOP_TYPE,REGION_NAME_EXT,ID_SHOP_EXT,DATE_EXT,SHOP_NAME,ZONE,ADDRESS,PHONE_NUMBER,ID_REGION, EMAIL, LOOK, LOOKIMAGE,SPECIALITY, PRICE, NOTES, LABEL, LABEL_IMAGE, WAP_DESCRIPTION,WEB_DESCRIPTION, LOCALITY, LOOKNAME, ...
316 byte By
geetuR at 2007-9-26 3:31:53
Hi I am working on a project that uses SQL Server 2000 as backend. Just today, when I tried to open the Enterprise Manager of SQL server, it gives me an error "MMC console cannot find the selected file"I have restarted the comp, reinstalled SQL server...but no luck!!HELP PLEASE!!! ...
Is there a way we can convert a null string that we get from a Database to maybe something like a space.Please let me know urgentlythanks
839 byte By
kttan at 2007-9-26 3:35:00
Hi JDBC Experts,Since I didn't get the answer for my previous question, I am giving more Duke Dollars to whoever gives the best answer :)(Too bad I was given 25 dd, otherwise I will give you more...)I searched the books all over the book stores but none really shows the sample code that ...
I am getting data from a ResultSet and putting it into a Hashtable. My problem is that some of the fields I am getting back are null, but I still need them. I would like to change them to an empty String, currently I am doing this but I would like to create a method to test if there is a null ...
159 byte By
firoux at 2007-9-26 3:35:19
Is there any effective way to retrieve the size of ResultSet object while the type of the ResultSet itself is a default one (TYPE_FORWARD_ONLY) ?
268 byte By
ka7ext at 2007-9-26 3:37:29
Has anyone had problems with compatibility between older and newer versions of JDBC? It seems to be automatically changing int into smallint and otherwise causing various random problems. Our problem is that we developed in 1.3 but we must now use 1.1.8.
4965 byte By
mgandham at 2007-9-26 3:37:57
I am unable to run executeBatch() in DB2, Error stack traceException in thread "main" java.lang.UnsatisfiedLinkError: SQLBindStringArrayat COM.ibm.db2.jdbc.app.DB2PreparedStatement.SQLBindStringArray(Native Method)at ...
Hi!I have a application that mangages adresses. The adresses are stored in a MS Access database. All columns are "Text" (VARCHAR(50)). I use the "sun.jdbc.odbc.JdbcOdbcDriver" to connect to the Database. Now the Problem: I had to instert special language signs (German) like ? ? ?. I use the ...
392 byte By
tda at 2007-9-26 3:38:51
Hi ALL!Can anybody tell me. Does exist in nature an JDBC driver that can connect and do interactions to any database (oracle, informix etc.) or may be subset of them?That is I want to fulfil sql92 ( or may be other dialect ) compliant expressions through JDBC and jdbc driver will convert its ...
In my jsp if I useResultSet rs.getObject(1)it gives me null...But if I specify...it as getInt or getString etc...it works fine...Can anybody help...meI need to usegetObject...as I am string the full resultset in an arraysmita
1063 byte By
dilippr at 2007-9-26 3:39:21
Hi,I have converted string to java.sql.Date format after parsing using the below code . String testd="10/22/1997";SimpleDateFormat sdfinDate = new SimpleDateFormat("MM/dd/yyyy");java.util.Date actualDate = null;java.sql.Date asql = null;try{actualDate = sdfinDate.parse(testd);asql = new ...
I wanted to download..freetds...But I so very confused...the ftp shows many zip and jar files...So which should I download and where...Also what else do I require to make it work..I am using Jrun ...and my database is MS SQL Server 2000 and JDK 1.3.0_02.Pl..its very urgent...Pl help..smita ...
775 byte By
jericd at 2007-9-26 3:39:52
Does anyone have any sample code for an Oracle connection pool using the thin driver? I've created my own connection pool that does not use Oracle's provided methods, and it works but I have a couple of concerns.Oracle connections cost, so I want to limit the number of connections in the pool ...
Hi,Can anyone show me how to get date value from MS SQL Server 2000? Or i need to create a Date class and use setTime() method to do so.Thanks for any help.
2148 byte By
ham17151 at 2007-9-26 3:41:59
Hello Everyone. When I use the getString method of a ResultSet class on a LONGVARCHAR data type, I get unexpected results. For instance, If the column contains a long text with several words (LONGVARCHAR data type), the getString method generates a string for each word in that column! ...
As above, I am trying to do a change password program which access a MS access database. I wanted to use the more convenient updatable result set which i heard from my friend which is better than sql statement to update the database. But it returns a exception to me. Does access support ...
239 byte By
soojee2 at 2007-9-26 3:42:12
Hi allI got jdk1.3 and im trying JDBC2.0 Features, but i count succeed. Im using the Driver given by SUN. rs.last() is not working...any thing else should be done...Need ur help in this.Thanks in advance.
244 byte By
Mussarat at 2007-9-26 3:42:31
i have connected a jdbc application with Access it is working fine but when i converted it into Applet it is giving me an error of SQLException and message is " No suitable driver "any one can help me?Mussarat
841 byte By
venkyp02 at 2007-9-26 3:42:53
I am using container managed persistence session bean to insert records in 3 different tables & i want to use setRollBack() method.My requirement is if any one fails to create a record , i should rollback the other records which are created .create()..... create().... create() if all the 3 ...
I am getting no suitable driver error from the servlet although the driver jar file is in the classpath. This is happening in Solaris. I tried to connect to a MS SQL server with JTrubo driver. I can see few other people got the error before. Does anyone know the solution? I tried by registering ...
347 byte By
ham17151 at 2007-9-26 3:44:15
Help me PLEASE. I'm having trouble with a column that has a data type of LONGVARCHAR. For instance, if a column value contains more than 255 characters, then if I've been using the getString or getObject, they both create individual Strings or Objects for each word that appear beyond 255 ...
hi i want to know y this programme is having problem with Querying the Data base import javax.servlet.*;import javax.servlet.http.*;import java.io.*;import java.sql.*;//import ap.servlets.*;public class qry_movie extends HttpServlet { Connection dbcon; public void init() throws ServletException ...
792 byte By
yu_hung at 2007-9-26 3:46:04
Hi there,I need to store and retrieve Date from the Oracle database and I just want to know what is the best way to do that. I have tried to use the java.sql.Date object but its Date(int year, int month, int date) constructor, getYear(), getMonth and getDate() methods are deprecated. But I also ...
i want to upload files using servelets and jdbc,please guide me , how could i approch the solution,if any of you done it earlier please help me also.
283 byte By
fredyd at 2007-9-26 3:47:54
I am trying to updating a table using prepared statement using executeupdate(). I need to write to a reject file if my update fails , the rejected resultset. I have tried to use getresultset() on preparedstatement and it does not work. any sugessions please.fred