Hi
I used the following code
snippet:
Class.forName("com.inet.tds.TdsDriver");
String URL ="jdbc:inetdae7:serverName";
Statement stmt = con.createStatement();
String query = "SELECT * FROM databaseName..TEST";
rs = stmt.executeQuery(query);
while (rs.next()){
System.out.println(rs.getString("c1"));
}
DatabaseServer: SQLServer
Driver
: Sprinta-inet
TableName : TEST
ColumnName : c1 with datatype
(varchar(30))
I used the following insertstatement to insert a
value:
insert into test values ('2000
"INFORMATION TECHNOLOGY"')
When I executed the pgm, I got the correct answer 2000
"INFORMATION TECHNOLOGY".
Can you now explain the problem more
clearly?
Thanks & Regards
Balasubramaniyan Krithivasan
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of tejas patel
Sent: Thursday, April 18, 2002 3:33 PM
To: [EMAIL PROTECTED]
Subject: resultset :getxxx() methodHello everyone,
sorry, to ask this question again. I have database field project which has value like
2000 "Information Technoloy" when I use rs.getString("project") it only returns 2000.
I also tried rs.getOject() but it did not work.
I really appreciate your help.
Thanks
Tejas
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
