Insert Text
when I try to save this text with "&" character , it saves only the first part of the text , for example : aaa&bbb , the result is only aaa . realy dont know how to solve it .
View Replieswhen I try to save this text with "&" character , it saves only the first part of the text , for example : aaa&bbb , the result is only aaa . realy dont know how to solve it .
View RepliesI was performing some testing on my forms and in the comments section of the form, I copied and pasted a large amount of text. All of the text appeared on my confirmation page that I have that shows all of the submitted information. Once I hit submit on the confirm page so that the INSERT will occur, only about 1/4 of the text that was entered shows up on my "Submission Confirmation" page.
The text insert appears in the database, but only the 1/4 of the text that was entered. I'm using the "text" datatype and the length is set to 16. Can anyone think of why only a portion of my text is being displayed and then inserted into the table?
I have a quick question regarding a text field for inserting record, I have a page which inserts various fields including area code an phone number for a new record, however I am curious if there is a way that I can either make the area code appear with brackets around it in the text field which is sent so that the user does not have to type it in each time.
I was thinking I could concantenate the value i send in each time with brackets but am not sure what the syntax would b for this. or perhaps there is another way of doing this?
I am trying to create an application feature for an inventory database and I am
wondering about the most efficient way to process the updates. Here's the background information: Code:
I'm trying to insert this text into a memo field:
Set cnn = CreateObject("ADODB.Connection")
str = Server.MapPath("database/alumni.mdb")
strDB = "Provider=MICROSOFT.JET.OLEDB.4.0;Data Source=" & str
cnn.Open strDB
Set rst = CreateObject("ADODB.Recordset")
sql = "INSERT INTO tblMessage (MessageID, UserID, PostTypeID, Subject,
DatePosted, MessageText, Active) Values ('" & vMessageID & "','" &
vUser & "', " & vPostType & ",'" & vSubject & "','" & vDatePosted &
"','" & vMessageText & "',0)"
rst.Open sql, cnn, adOpenStatic, adLockOptimistic
vMessageText = "This is a test just to see if it will blow up on a
large comment. Just testing again. Don't mind me."
Can I put this into my database field or is it too much and if not,
how do I solve this issue. I need to be able to post messages and
input for large fields.
How to prevent duplicate values when using BULK INSERT to insert CSV to SQL Server? Code:
View Replies View RelatedI have this problem in controlling a the text in a Text Area. How can I do
that for example the field size is 200, when it reaches 50 it automatically
goes to the next line. Bcoz im having problem when viewing it in my report,
it continuesly views in a strieght line and im having problem in printing.
When using ASP's FileSystemObject to create text files, I am unable to get user submitted text (in Hebrew) to save as anything other than "?????". The text file is being saved in Unicode and setting the CodePage in ASP proved unsuccessful. Strangely, hard coded Hebrew text in an ASP variable does add to the text file correctly.
Any ideas of why this happens and how to get it to work correctly?
I have a text area which I want to limit the number of words or number of text entered into it. Is this possible?
<textarea name="textarea" cols="35" rows="5"></textarea>
In the text area above, can I say limit the person filling in the text area to say 100 characters?
I have a form on asp page that pulls info from a DB when the page loads.
It them puts the info into text boxes on the page that are editable by the
user.
The only problem I have is say in the description text box it should
read "HP Laserjet 5Si" , it always cuts the text off where it just says "HP"
.. It does this on all the text boxes? I can't seem to figure out why it
is doing it. Here is the sample code:
With quotes around <%= vdesc%>
<td><input name="desc" type="text" id="desc" size="45" value="<%=
vdesc%>"></td>
And I tried it without.
I have text in a field coming from a database. The text has various
forms such as:
text1
text1 or text2
text1 or text2 or text3
text1; or text2
text1; or text2; or text3
etc...
how can I parse this with a reg ex? I tried this:
(.+);? or
but it only captures 1 submatch (text1) and only if theres an "or"
after it
I'd like to get 1 submatch for each piece of text separated by the
"or", just the text itself if there is no or.
Anyone know how to do it?
I have this problem in controlling a text in a Text Area. How can I do that, for example the field size is 200, when it reaches 50 it automatically goes to the next line. Because im having problem when viewing text in my report, it continuesly views in a straight line. Can you give me ASP code for that.
View Replies View RelatedI have text - ARI Promise, when I hover over the text I would like a box to appear with the Promise information. It would be several paragraphs that need to be formatted with paragraph and bullets. Is this possible to do? If so how would I go about it?
View Replies View RelatedI have a search page, after search returns value I want to display fields in text box instead of table.
View Replies View RelatedOur graphic designer has just finished redeveloping our website. On the
site, we use SSL to secure the area where a user enters their personal
information to order items from us. (we do not do many transactions - maybe
1 per day...) We are a log home mfg company so they would only order plan
books, maybe a video etc...
When the user clicks "Submit Order", we want to encrypt each data item
(because of new legislation governing customer personal info etc...) and
write a record to an access db. From here it will be imported into our
Customer DB leads database...
I do not use ASP but program in VB 6 and Access 2000. ASP looks similiar in
many ways...
Does someone have a good ASP script for encrypting data? And, if so, is it
fairly strong encryption?
Also, is there any trick to writing an "insert" SQL script in ASP or is it
exactly the same as I would do in VB or Access? Maybe someone has an
"insert" script handy they could pass along including the command to
actually execute it?
i have got a data base which contain more than one tables
one for student one for teacher and one for books
i make a fourm to read the input from the user Code:
Code:
mySQL="INSERT INTO products (sku, youtube, description, details) VALUES ('" &pSku& "','" &pYoutube& "','" &pDescription& "','" & pDetails& "')"
call updateDatabase(mySQL, rstemp, "insert1")
that's shortly the way i'm inserting new records.
using mysql and asp functions.
The prob is that inserting only one record every time.
if i got data for 3 records how can i make it at once
to add 3 new records in some given order into the db
What is the best way to see if a record has inserted correctly into the datase in ASP?
Also, how to tell the user what the error is.
I am inserting like this with the ADO command object:
Dim sInsert, objCmd
set objCmd = Server.CreateObject("ADODB.Command")
sInsert = "sp_ADS_Insert_Driver_General_Data "
on error resume next
With objCmd
.ActiveConnection = oConnEnergy
.CommandText = sInsert
.CommandType = adCmdStoredProc
.Execute , , adExecuteNoRecords
Application X has three screens. The user captures information on screen one and then clicks a navigation button to go onto screen two.He does the same on screen three. At the bottom of screen three is a submit button. When this button is clicked the system does some calculations with the information that is supplied and then uploads all the info that was captured on the screens to the database.
Should the data be uploaded to the database all on one go when the user clicks the submit button or should it be uploaded after each screen - ie when the user clicks the button on Screen 1 the data is uploaded to the database and then screen two is displayed.
When the following code runs it produces no errors but doesn't give proper results:
sql = "INSERT INTO TableName (Line1, Line2, Line3, Line4) VALUES ('" & lines(0) & "', '" & lines(1) & "', '" & lines(2) & "', '" & lines(3) & "')"
Response.Write(sql)
SET RS = Conn.Execute(sql)
lines() contains nothing but strings and is never empty.
The Response.Write(sql) shows the proper values going into the proper locations.
However, only Lines(0) actually populates the table. Line2, Line3, and Line4 never receive any values despite the SQL showing the proper syntax.
i have this insert statement that is giving me trouble, the problem is with expiration_date field the error i'm getting is:
Syntax error in date in query expression '##'.Code:
SQL_Insert = "Insert INTO TableName(ColumnX, ColumnY, ColumnZ, ColumnZZ, ColumnXX, ColunmYY, Expiration_Date) values ('" & _
ColumnX& "', '" & ColumnY & "', '" & ColumnZ & "', '" & ColumnZZ & "', '" & ColumnXX& "', '" & ColunmYY & "', #" & Expiration_Date & "#)"
I have a column call UserDate and it's properties are this : varchar(50) . I have a function which updates the column with todays date. for some reason, if I manualy give the value to be inserted a value of '10/10/2006' or use date() it inserts a value of 0 if I give a value of 4 to be inserted it works?
I have been working on a project for 2 days and this is the last piece to get it to work, can anyone point out where I'm going wrong. P.S I have tried giving the colum a date format but unfotunately the format is american and I need it in english to compare with something else I'm working on.
How can i get the last inserted record in an ASP ACCESS combination? Code:
View Replies View RelatedI'm looking for tutorials on how to upload a file (.doc or .pdf),insert in database and retreive from database. i'm using pure asp and sql 2000.
View Replies View RelatedI'm getting a syntax error when I try to run this SQL Insert statement, can anyone tell me what might be wrong? Before I was getting a data type mismatch error then I removed the ' quotes around the intPhone variable. The error occurs on the line after the SQL statement.
strSQL = "INSERT INTO candidates (Name, Grade, CivilService, Branch, Department, Sector, Town, EmailAddress, PhoneNumber, LunchReq, SpecialReq) VALUES ('" & strName & "','" & strGrade & "', '" & strCivilService & "', '" & strBranch & "', '" & strDepartment & "', '" & strSector & "', '" & strTown & "', '" & strEmail & "', " & intPhone & ", '" & strLunchReq & "', '" & strSpecialReq & "')"
Set rs = cn.Execute(strSQL)
I have a 2 asp pages for a registration form. The first one is where the user types the data, and the second one has a form that requests the data from the 1st one and then sends it to the database. Both are sending the data correctly (I've seen it on the error page) but it's not feeding the DB.
View Replies View RelatedI have a website I am working on that I did not create. It is ASP and SQL based. There is a content management system created using ASP and saving in the SQL server database. A user can enter a news article into a big text box/area, and choose to add an image. The text and image are stored in the database via ASP and pulled out to the website via ASP.
The image shows up in the website to the top left of the article. I need to make it so the user can enter an image where their cursor is in the paragraph (like a word document) and have it also show up there on the website. Any ideas?
I have a problem. I have ASP code and Javascript code. Now, I want to access ASP code inside javascript code. Here is the ASP code:
View Replies View RelatedI have a form which the user fills and submits.i have insert statement there.
When i submit the form to itself ,the values get submitted and inserted in DB easily.
<form method="post" action="Infoviewagentver212.asp" name="form">
Now when i want the user to hit submit and go to other page i change the above to:
<form method="post" action="newpage.asp" name="form">
but here what happens is my values are not getting inserted in the DB??
How do i do this?
This is on my HTML page
<td align=center>
<textarea cols="85" rows="7" name=""Problem"></textarea>
</td>
User" enters information into this box.
If they use either a quote or double quote, but SQL statement bombs. Is
there a way quick way to fix this beforehand?
Conn.execute ("INSERT INTO PROBLEMS (Problem) VALUES ('" & Problem & "')")
How to insert fields in a table by using SQL?
View Replies View RelatedJust like to know if I am correct and no problems in this scenario:
I have page where the user clicks a button to save some information >>
gets directed to page 2 where a value gets returned from a recordset and the form is inserted automatically upon loading with the value (sequential for the database table) >>
the user then gets redirected to page 3 upon insertion into the database, if I use 'Select Top 1 ......' as a query to retrieve some information on this page am I sure that this is the correct record just inserted even if 2 or more people are saving at the same time?
This is my code, for some reason, when I use this exact code it doesn't update my database, but if I use the next section of code it does. Anybody knows why that when I use two different "Insert" in If Then End If, it doesn't work? Oh and I did try the "If PID = 105 OR 151 Then" alone and it works well. Code:
View Replies View Related