Click here to Skip to main content
12,623,511 members (32,035 online)
Rate this:
Please Sign up or sign in to vote.
See more: JSP
Hello, The problem is Code is working when rs.getString
(1) is integer number, but in my case it's a varchar primary key , how to fix this.

function getId(id){
    var f=document.form;
Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("select IdwhichIsVarchar, description from  SomeDataBase where IS_VISIBLE = 1 order by description  ");
<td><input type="button" name="edit" value="Edit" style="background-color:green;font-weight:bold;color:white;" onclick="getId(<%=rs.getString(1)%>);" ></td>
Posted 4-Dec-12 9:15am
Updated 4-Dec-12 9:52am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.161128.1 | Last Updated 4 Dec 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100