473,480 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Inserting text box into a form, displaying values from recordset

I'm trying to create a form that allows me to modify the contents of
list. When the user clicks on the modify button, it takes them to a
page which displays the quantity of items they purchase, and allows
them to update that quantity. So the quantity is shown in a textbox,
and the content of the text box is drawn from a rs("content").

But the page is crashing when I run it. I'm having trouble getting the
response.write textbox line to work. Here's the code:

response.write "<td align=right><input type="text" name="quantity"
value=" & rs("qty") & "></td>"

This is the line that is causing the page to crash. Can't figure out
why. Can someone give me some insight into this?

Thanks,

Bill
Jul 19 '05 #1
2 4296
You're getting an error? What is it? Unterminated string constant,
perhaps? Always post the error.

What you do when you get an error, look at the line of the error, and think
about what would happen if you were the server. If you were the server
here, would you know which " are part of HTML and which are part of the
string that you want to response.write? No. That's what the problem is.
Your " right before the word "text" is the end of a string, as far as your
server's concerned. To "escape" quotes in VBScript, you double them.

response.write "<td align=right><input type=""text"" name=""quantity""
value=""" & rs("qty") & "></td>"

Ray at work

"Bill" <bi***********@gospellight.com> wrote in message
news:8d**************************@posting.google.c om...
I'm trying to create a form that allows me to modify the contents of
list. When the user clicks on the modify button, it takes them to a
page which displays the quantity of items they purchase, and allows
them to update that quantity. So the quantity is shown in a textbox,
and the content of the text box is drawn from a rs("content").

But the page is crashing when I run it. I'm having trouble getting the
response.write textbox line to work. Here's the code:

response.write "<td align=right><input type="text" name="quantity"
value=" & rs("qty") & "></td>"

This is the line that is causing the page to crash. Can't figure out
why. Can someone give me some insight into this?

Thanks,

Bill

Jul 19 '05 #2
It sounds to me like you are posting back to the same page (assumption)
and you are getting the error when the feild is empty.

I would so something like...

If Not rs.EOF Then
Response.Write "blah, blah"
End If

hth,
Andrew

* * * Sent via DevBuilder http://www.devbuilder.org * * *
Developer Resources for High End Developers.
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3659
by: Geoff Wickens | last post by:
I am quite new to all this but am trying to create a database driven site. I have been able to use information from my sample database but I now want to be able to insert data into it. At present I...
14
4037
by: Miranda | last post by:
Hi, I have a ASP/vbscript program that generates random passwords. The problem is I need to insert those passwords into an Access database of 327 clients. I have the random password program...
0
2419
by: Marko Poutiainen | last post by:
Situation: We had to make our SQLServer 2000 database multi-lingual. That is, certain things (such as product names) in the database should be shown in the language the user is using (Finnish,...
6
7371
by: 35th Ave Media | last post by:
Hello, I have about 60+ pages that I need to insert a MAILTO: tag so people can email the page using their email client. The body of the message is going to be the URL of that page. Using ASP,...
10
12234
by: Roger Withnell | last post by:
I'm using ASP, VBScript and SQL Server. I'm also using UTF-8 character set and so my codepage is 65001 and SQL Server datatype nvarchar. I can insert unicode characters correctly into the...
3
1867
by: rizwanrazzaq | last post by:
Hi friends here is my coding.. but i m facing one problem .. i used both mathod SQL mathod and open Record Set. but in both i m getting error massage can anyone help me out regarding thi. Please...
8
1416
by: mvdave | last post by:
Hello all & I hope I'm posting in the right place.. I need to load a temporary table with a range of sequential dates, passing it a beginning and an end date from a criteria form. I have...
2
3053
by: AlexanderDeLarge | last post by:
Hi! I got a problem that's driving me crazy and I'm desperately in need of help. I'll explain my scenario: I'm doing a database driven site for a band, I got these tables for their discography...
11
5139
by: jwessner | last post by:
I have a form (Form1) which contains basic Project data and a subform listing the personnel assigned to the Project as a continuous form. Selecting a person on that project and clicking on a command...
0
7046
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6908
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...
1
6741
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...
0
5342
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,...
1
4783
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...
0
4485
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2986
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
183
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...

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.