473,657 Members | 2,634 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting DB value in a Text Box of a JSP

3 New Member
Hi Pals,

I need your help regarding following problem.Im working in MVC model application which has jsp, servlet,and bean file.
By the flow of application , I have to display datas in jsp page which stored in a DB. And also I can display those datas in a table by using <td><%=rs.getSt ring(1)%> statement.

This jsp has text boxes. So I want to display those db values in a textbox. I tried using the line <input type="text" value="<%=rs.ge tString(2)%>" name="n1" >

but it shows "[Microsoft][ODBC Driver Manager] Invalid cursor state " . I don Know whether this is a correct way to get the value in a text box or is there any other alternative way..

Please Help me as soon as possible..
Jul 17 '07 #1
1 3774
r035198x
13,262 MVP
Hi Pals,

I need your help regarding following problem.Im working in MVC model application which has jsp, servlet,and bean file.
By the flow of application , I have to display datas in jsp page which stored in a DB. And also I can display those datas in a table by using <td><%=rs.getSt ring(1)%> statement.

This jsp has text boxes. So I want to display those db values in a textbox. I tried using the line <input type="text" value="<%=rs.ge tString(2)%>" name="n1" >

but it shows "[Microsoft][ODBC Driver Manager] Invalid cursor state " . I don Know whether this is a correct way to get the value in a text box or is there any other alternative way..

Please Help me as soon as possible..
Invalid cursor state has nothing to do with the lines that you posted.
Check your calls to rs.next and see if you're not overrunning the resultset.
Jul 17 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
2841
by: VK | last post by:
Hi! What I'm missing in following code? Cannot get the values of radiobuttons. Starting only one class (GetVariant), it works. When I put two classes together, it doesn't. Regards, VK from Tkinter import * class GetVariant: def __init__(self): self.root = Tk()
1
1760
by: mikea_59 | last post by:
I would like to use XSLT to translate some tagged value text to XML elements like this: Input Doc: <data>x=1.234 y=ABC z="Hello World"</data> Output Doc: <x>1.234</value>
15
20541
by: Aaron Gray | last post by:
<iframe name="iframe" width="100%" height="25%" src="test1.txt"> </iframe> <a href="test1.txt" target="input">one</a> <a href="test2.txt" target="input">two</a> <form name="form1"> <textarea name="textarea" cols=80 rows=18> This is a test </textarea><br>
5
2290
by: velu | last post by:
Problem in getting value from textbox & radiobuttonlist to a valuable inside a datagid. I want to insert a record into a table thru datagrid. Here is the code (see below) Private Sub DataGrid1_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs ) Handles DataGrid1.ItemCommand
3
2118
by: daveyand | last post by:
hey, I know in the new browsers you're not able to change the value of the status bar. Which is fair enough, i understand why and agree. Although, i cant seem to get the value of the status bar. One used to be able to do window.status. But that doesnt seem to work. Wondered if someone could point me in the right direction.
4
4571
by: bushi | last post by:
hi ! i have following code to display some text on a web form,after getting it from database. <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1"> <ItemTemplate> <asp:LinkButton ID="links" runat="server" Text='<%# Eval("links") %>' OnClick="LinkButton1_Click"></asp:LinkButton><br />
1
1240
by: renatois | last post by:
Getting value from GridView Hi guys, I have a GridView and I need to access a value of an ID field on an event. I converted this field into template and the name of the label control in ItemTemplate is Label1. I´m doing string fabID = Convert.ToString(GridView1.FindControl("Label1")); When I hard-code it works (ex: string fabID = "22";) Can anyone pls help? any idea
6
1580
by: iDesmet | last post by:
Good day! I was wondering if someone could show me the way with this little problem I have. I need to get the value/text of every checked SubItems in a listview so I can execute a Sub. The Sub I had created needs such value for inserting data in MySQL. My Sub is called: InsertSelItem(ByVal SelItem As Integer)
2
7234
by: jerald m | last post by:
Hi, how can i pass the user input value of ( in text box field) to the another Jsp in url? Form Code <td> <input type="text" name="dil_ProjectCode" id="dil_ProjectCode"> </td>
0
8319
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8512
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7347
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6175
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2739
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.