Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Input in to Access DB 1

Status
Not open for further replies.

kefi2927

IS-IT--Management
Apr 3, 2003
40
GB
Hi Guys
Seting up an HTML form from asp web page.

When I use the textarea tag with multiple rows & when I put info into it and I've pressed the enter key to stay within the textarea to put more text into the textarea box the access db only picks up on the first line before I've hit the enter key. Do I need to do anything with the field in the access db to allow all text within the textarea tag to be inputted into the field?

Also, the text field in access db will only allow 255 characters. Can this be inceased?

Cheers for anyone who answers. Take care.

K
 
Change the Field type to Memo for access database.
It should work then.

________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
Tried that. It still doesn't work.
I'm using Access 2000. Does this help?

K
 
Also you should check to avoid Quotes
something like
data=Replace(Request("data"),"'","''")

I've used this code and had no problem ever, no need to take care of Quotes from the data.
Code:
sql="select top 1 * from myTable"
rs.Open sql,conObj,3,3

rs.AddNew
 rs("data1")=Request("textarea1")
rs.Update


________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
I've changed the field type to 'memo' & this allows me to store more than 255 characters.

The problem is that I need it to store characters that have been put into the textarea box that have been put in when the user has pressed the 'Enter' key to put more info on to another line within the textarea box.

Any ideas?

Cheers

K
 
The example i've showed works for any data type.

________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
This is my code. It looks pretty similar to yours.


sql="SELECT * FROM staffsurvey"
rs.open sql, Connect, 3,3

RS.AddNew

'input to recordset from form data
RS("IssuesId") = Request.Form("IssuesId")
RS("IssuesIdReason") = Request.Form("IssuesIdReason")
RS.Update


The form is on another page. Does this make any difference?

Cheers

K
 
The code looks ok, you must have other problem then.
Check to see what you receiving from the other page with an response.write...

________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
This is the code to see what the output was:

<p>
<%=RS("IssuesId")%>
</p>

This showed all characters that was entered in to the textarea box - including characters on other lines within the textarea box. It's just when it goes in to access db it doesn't show any characters that have been entered on to another line in the textarea box.

The field in the access db has been changed to 'memo' like you advised. It must be something to do with the db field??
But blowed if I can work it out.

K
 
How do you display in your textarea?


________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
Just worked it out. The simplest of things.

Needed to pull down height of field in db. What a numbskull!!

Thanks for all your help with this.

Take care

K
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top