columns with same name gives "column not found"

500 byte By pcarver at 2007-9-26 2:16:43
I'm using ODBC to retreive data from MS Access. Something like:SELECT x.*, y.Key, z.Key FROM x, y, zWhen I do a ResultSet.getString("y.Key") I get a sql exception, "Column not found".There is a "Key" column in each table, but when I try to use the "table.column" format, I get this exception. ...

Programatically insert into database

1108 byte By vy_ho at 2007-9-26 2:16:56
What's wrong with Java JDBC 2.0?Using a java reference book, I insert something into a database table using jdbc-odbc bridge. The code seems to be very simple:sql = "select * from sometable"stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);rs = ...

update data with CachedRowSet failed ! Help....

1059 byte By lml919 at 2007-9-26 2:18:24
I can select data from Oracle DBMS with CachedRowSet,However I can't update data with it.the Exception is :Cannot determine the table nameCan anyone help me out with theabove problem?my email is: lml919@yeah.net my codes are:Connectioncon = ds.getConnection(); Statement stmt = ...

unable to use jdbc2.0

395 byte By supriya_phadke at 2007-9-26 2:19:36
hello ppl,i tried to use the jdbc 2.0 API with resultset. i.e. i tried to use the insertRow() and other methods which are jdbc2.0 specific.but when i compile the application and run it,i get an error saying jdbc2.0 API not implemented here.i am using jdk1.3 on windows NT platform.someone help ...

Ms access

445 byte By yilmazay at 2007-9-26 2:20:08
hi all,Though this is not a jdbc problem, but it is related.in addition i couln't find a solution in Access web page.I am developing a message board with java servletsmy problem is : access doesn't accept data longer than 50 chars. How can i configure it so that users can enter as long as ...

CachedRowSet and ResultSetMetaData.getXXX() methods

1708 byte By pgarner at 2007-9-26 2:20:19
I have created a reporting application in J2EE environment, which uses CachedRowSet and was working just fine. Then I decided to improve this application, in part by using ResultSetMetaData to get things like number of columns, column names, column types, columnlabels, using the getXXX() ...

JDBC/JSP problem...please help!!!!

639 byte By moined_mogul at 2007-9-26 2:20:56
I have a JSP that has five text boxes in the centre of the page. Each of the text boxes represent a field in my database table. The first box is actaully a select box (not a text box), that has a drop down menu with all the items in my first column in my table of the database which is a ...

Fail to convert between UTF8 and UCS2: failUTF8Conv

244 byte By madhavjs at 2007-9-26 2:21:34
Does anybody has a solution for this JDBC error(Fail to convert between UTF8 and UCS2: failUTF8Conv). I saw many discussion threads regarding this tpic but couldn't find any solution mentioned. ThanksSrinivas.

Connection availability

443 byte By javastus at 2007-9-26 2:22:29
i am writing a JDBC application , its a simple application and does have any users so i am not using database pooling.I am setting the connection in one class and getting the connection from that class in rest of the classes.I am closing statements and resultsets after excecuting the ...

How do I delete DATE/TIME rows?

672 byte By dUb at 2007-9-26 2:22:44
I have a database with that I access through a servlet and it is supposed to update the field Date_Modified. My code is as follows.java.util.Date date = new java.util.Date();java.sql.Date sqlDate = new java.sql.Date(date.getTime());String dat = String.valueOf(sqlDate);PreparedStatement pst = ...

Please help me with this JDBC-ODBC Problem

17807 byte By Jaredth at 2007-9-26 2:25:07
you can look the constructUpdateSQL.. its very useful..here's the problem,i'm having an SQLException "[[Microsoft][ODBC SQL Server Driver]Associated statement is not prepared]" when i run the update() for the second time..// i_conn_main's class is at the code ...

SecurityException on an Applet on Localhost

5808 byte By fcalmon1 at 2007-9-26 2:25:30
Hi I've got this problem i hope u can help me to solve:I have an application that connects to a DB Oracle personal 8i, through Personal Web Server running over a win98 OS and it runs perfect. But when i try to connect through an Applet it throws a SecurityExceptionEX. It can't connect to a my ...

how to retrieve number of rows of a table by jdbc?

237 byte By yilmazay at 2007-9-26 2:25:35
can anyone show me a simple snippet of a java code about how to retrieve the number of ROWS in a table?or even only showing the jdbc command that does this job would be enough.thanks in advance :)cheers

How can I get UserTransaction from a EJB Client?

1051 byte By rongan at 2007-9-26 2:26:05
HiAnyone can tell me what is the correct way to get the UserTransaction from a EJB Client? I've tried the following code in JBoss, but it gives "javax.naming.NameNotFoundException: comp not bound" error:Properties env = new Properties();env.setProperty("java.naming.factory.initial", ...

datasource problem (JRun with MySql)

3074 byte By doogie at 2007-9-26 2:26:09
Hi, Has anyone used MySql with JRun?I'm trying to connect to a datasource that I have defined using the JMC as follows:name: MySqlCdCatalog driver: org.gjt.mm.mysql.Driverurl: jdbc:mysql://localhost:3306/cdcatalogAll I ever get is failure to lookup the ...

where can I get a db2 jdbc driver with connection pool

211 byte By leech huang at 2007-9-26 2:26:39
hi,allI want to look for a free jdbc driver to connect to db2 using with connection pool.it isn't present in db2java.zip thanks and regardshuangm2000@sina.com.cn

Retrieval of Information from Excel Sheet using JDBC-ODBC

4234 byte By ruchi_rcs at 2007-9-26 2:26:55
Hello, Currently I am writing a program that extracts information fromexcel sheet. This excel sheet have some values in Chinese. I am able to extract English character from the different column in excel, but if some column contain chineese valur then it prints ?. After that I looked on net and ...

MS SQL Stored Procedure and the JDBC

638 byte By jamochacoder at 2007-9-26 2:26:59
I have been assigned to create a JSP that uses an SQL Stored Procedure that returns an output parameter. Normally, this is no problem. However, this particular store procedure calls other stored procedures and exchanges data between them. This same stored procedure works in an ASP But not my ...

ResultSet error with Weblogic 5.1

651 byte By martagle at 2007-9-26 2:27:34
Hi:We are having some problems with some method of the Interface ResultSetWe have Weblogic 5.1 and a pool that connect to a Oracle DB 8.1.5 through an Oracle thin driver.We make the connection to the pool and get a ResultSet rs.In the loop that goes through the records I can get the information ...

Problem in using createStatement with parameters

1392 byte By chandan_p11 at 2007-9-26 2:28:18
Hi,I have a peculiar problem using JDBC-ODBC bridge driver. With this driver I am able to make a connection to the database (Oracle/SQL Server/MS-Access). But when I try to create a statement using the connection, I get an error. The code written by me is below ...

can not insert time into Ms access

931 byte By yilmazay at 2007-9-26 2:28:26
hi guysi need your helpi already succeeded to insert normal string values (message, sender name, etc) into the databasehowever i also need to insert time of the messageit seems so simple, but it can't inserti tried every possible way, but in vainhere is code :String insert="INSERT INTO board( ...

Programmatically create DSN in java for output excel file

434 byte By umeshnair at 2007-9-26 2:29:06
Hi guys,I face this problem : I read from an excel file using jdbc-odbc bridge. I manipulate the data extracted and need to write it to a new excel file. This piece of code can be executed on any machine. How do i create a DSN for this output file programmatically. I mean, how do i access this ...

Get the primary key

261 byte By arnaud.java at 2007-9-26 2:29:29
Hello,I would like to get the primary key of a MS Access table, but the DatabaseMetaData.getPrimaryKeys(...) doesn't work. An exception is thrown.Anybody knows how to get the primary key of a MS Access table?ThanksArno

Alias for column names : Urgent

435 byte By Priyam at 2007-9-26 2:30:41
Hi , I want alias names for my columns.I'm writing query like thisinquiryBean.setQueryStatement("SELECT CDE AS "New Code", TXT AS "New Text" FROM TNR004_PY_METH");But it is giving me an error because there is space between New and Code also double quote problem is there.In short I don't know ...

Connection Pooling for Update Record

335 byte By sisenthil at 2007-9-26 2:30:54
Im trying with an web page which selects some records for update. The next time when the user sends a requests for update or rollback how to find which connection object was used to select those records. Is there any way to rollback just a few records update if a set of records has been ...

ResultSet closed

681 byte By deandaniel at 2007-9-26 2:32:53
I'm doing some JSP/Servlet/JDBC coding. I let the servlet connect to the database. I finally came to the part of simply displaying the data in JSP with the obtained ResultSet. I didn't close any of the ResultSets (in the servlet). But when I forward the request/response to a JSP (for ...

Unable to connect to oracle using type4 driver

1625 byte By mrshahzad65 at 2007-9-26 2:32:54
hi I was trying to connect to oracle Database using type 4 thin drivers on win98.I downloaded the driver from oracle site and also downloaded some more drivers from other sites.While connecting to data base I ran into problems I am working for about two days on this thing but couldn't succeed. ...

Oracle does not listen on TCP/IP port

1625 byte By mrshahzad65 at 2007-9-26 2:32:59
hi I was trying to connect to oracle Database using type 4 thin drivers on win98.I downloaded the driver from oracle site and also downloaded some more drivers from other sites.While connecting to data base I ran into problems I am working for about two days on this thing but couldn't succeed. ...

Using PreparedStatements

2372 byte By deandaniel at 2007-9-26 2:33:23
Can anyone explain what does the following error mean? I'm getting it when I use PreparedStatements to connect in a MS Access 2000 database. Context log: path="" Error in jsp service() : [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented javax.servlet.ServletException: ...

IS CONNECTION OBJECT THREAD-SAFE?

22 byte By kukukkikuk at 2007-9-26 2:33:54
Anybody?

Time is returned as 00:00:00.0

504 byte By dUb at 2007-9-26 2:34:06
I have run across a problem, where I am printing out the column, Date_Modified. When it is printed off the date on it is correct. However the time is set to 0:00 like so...2001-07-31 00:00:00.0 . Any ideas on how I can fix this? Here is my code.pst = con.prepareStatement("UPDATE FOO SET ...

Accessing data of various SQL types

1436 byte By ham17151 at 2007-9-26 2:35:09
Before I ask my question, here's an exerpt of a program I'm using to create a JTable that shows the result of my query:private Vector getNextRow( ResultSet rs, ResultSetMetaData rsmd )throws SQLException{Vector currentRow = new Vector();for ( int i = 1; i <= rsmd.getColumnCount(); ++i ) ...

SQL server , adding a new table (help!!!!)

1310 byte By yilmazay at 2007-9-26 2:35:36
hi all, i have a problem with SQL serverbefore i was using ms access and jdbc odbc drivernow i wanted to switch to sql server.in 'pubs' database (which is a sample database in SQL 2000, i created a new table same as the one i used in ms access. i registered it as a system DSN as well as user ...

multiple updates?

85 byte By jinkk at 2007-9-26 2:36:30
how to do multiple updates in a single request?thanks jin

Excel on remote location(web server) and jdbc access

1102 byte By SRamkuma at 2007-9-26 2:36:45
Hi,I have some excels on a remote web server, which i want to read using an applet.However when i use the following piece of code(got from what has been posted in tthis forum) i get the error " [Microsoft][ODBC Excel Driver] Invalid internet address."(I tried this using an application ...

what really happens does it converts ascii to unicode

303 byte By parul_patidar at 2007-9-26 2:36:50
hi java understands unicode that is 2 byte encoding andoffice 97 doesn't understand unicode. then how data stored in access 97 (ascii 1 byte encoding) are correctly interpreted by java if i insert '\u0900' a '?' get inserted in to access tablecan someone tell me. ...

how to check updated row ?

228 byte By malu4ram at 2007-9-26 2:36:54
Hi,I am reading a record and displaying to user. After sometime the user changes some fields and want to update.Is there any way to check before update, whether the row was updated in the mean time ?

Connection.setAutoCommit and Database locks

515 byte By seralex at 2007-9-26 2:37:13
Hello friends,I would like to discuss using transactions through Connection.setAutoCommit function. My question is - what type of lock does the Connection.setAutoCommit(false) create?Is it a database lock, or a lock based on the queries that follow? For example, using Microsofts ...

try to resolve it!!!!!!!!

351 byte By satish_gs at 2007-9-26 2:37:26
I am trying to use ref cursor as a return type to a function. I am taking this ref cursor value in java using cursor as data type. If cursor referring single table i can get column names cursor refers using ResultSetMetaData by setting %ROWTYPE. If my cursor refers to multiple tables what is ...

URGENT:Lotus notes

240 byte By shubhrajit_c at 2007-9-26 2:37:32
Does anyone know how to interface Lotus notes database with WebLogic?I am searching for a type 4 driver , does anyone know the URL ?My architecture:WebLogic on SolarisLotus notes server on NT

where should I put JDBC driver for MySQL

357 byte By donno20 at 2007-9-26 2:38:21
I am trying to connect MySQL with JDBC 2.0 API. I have downloaded the driver file mm.mysql-2.0.4-bin. Where should I put this driver to make it run ?According to mysql.org, it says "Put mysql.jar in your classpath". I am confuse by classpath. Is it same as the path ? or is another system ...

Help--to acquire value from resultset

422 byte By smitaunni at 2007-9-26 2:39:03
I am using sql server 2000 on windows nt machine...I have Jrun on my machine..My problem is When I execute an sql statement it gives me the resultset...But the fields that are stored as ntext or nvarchar in sql ...when I try to retrieve them as getString() in my jsp...They give me a big ...

Using JDBC to let an Applet read from a Database

1241 byte By JohnLoughran at 2007-9-26 2:39:11
My Boss says I'm mad to try using JDBC to allow an applet read from a database. I had intended my applet to read results from a database stored on the server and to read other options to display from the DB too. This would involve registering the DB on the Server and the applet querying it ...

How do I do a JDBC update?

260 byte By CHEERS at 2007-9-26 2:39:28
Could someone give me an example of how to properly update a record in a table. I have the fields name, age, telephone. I want to add a line to my code to update each of the the fields with a new value for the one row.Thank you in advance.

JDK1.3.1 and JDBC-URL Connctionon on Windows NT 4

1676 byte By BigOcean at 2007-9-26 2:40:26
Hi, Hartmut and other JDBC experts. Please help me to getting started on the subject.The following code (taken from JDBC API Tutorial and Reference, 2nd Edition by White, et. al) is compiled okay on Windows NT 4:import java.sql.*;public class CreateCoffees { public static void main(String ...

retrieving column labels with JDBC

550 byte By beatrizc1 at 2007-9-26 2:40:37
Hi!I labeled all the columns of a table using "label on column...." (I'm using DB2) but I can not retrieve those labels in my Java server. I tried getting the meta data for the result set and calling the method getColumnLabel(), but (surprisingly) it returns the column names, the same as ...

Connection pools

619 byte By stewajc at 2007-9-26 2:40:53
I am trying to get Connection Pooling to work with Oracle. The classes12_01.zip has pool package and implements the javax.sql.DataSource interface.The legacy system I am trying to pool connections to is set up such that the user I am retreiving data for in the middle tier needs to connect with ...

A beginner delete question.

180 byte By me_elf at 2007-9-26 2:41:44
I want to delete a record from oracle database by comparing a string in a column.delete from product where LINE1='any **** here ';whats wrong with it?

render tab to printer

350 byte By martu_2001 at 2007-9-26 2:42:42
hi friends,i want to print the text example " This is my\tsample text"but when i am trying to print this , inspite of printing like"This is mysample text"it was printing as "This is mysample text"i am using linebreakmeasurer class..can u tell me how to render the '\t' to the printer.. ...

update Blob field in ResultSet with Java2 --URGENT

2386 byte By felmerien at 2007-9-26 2:44:03
Hi,Before install J2EE environnement, I manipulate Blob with jdbc interface:I made a insert with the Blob field to null and after this insert I executed a "select for update" to get a updatable ResultSet and used updateBinaryStream() methode to set my file in the Blob. It works OKNow, with J2EE ...