Inserting Illegal Chars To Sql Db?
We try to insert some illegal chars such as "I don't know how to do it" from notes textarea to the DB.
When I insert, it said that "Microsoft OLE DB Provider for SQL Server (0x80040E14) Line 1: Incorrect syntax near 't'." which is "Don't" .
I have tried this: notes= replace(replace(Request.Form("notes"),chr(13)," "),chr(10),"<BR>") But, NO LUCK. How can we make it works?
View Replies
ADVERTISEMENT
declaring an variable for incrementing called "I" as shown below:
I = 0
Gives this error:
Microsoft VBScript runtime error '800a01f5'
Illegal assignment: 'I'
/thx.com.au/includes/cart.funcs.asp, line 20
View Replies
View Related
I'm fighting a bit of code which I simply don't understand why it won't work. originalurl is the referring page from which someone clicked a form submit. I grab originalurl using Request.ServerVariables("HTTP_REFERER")
What I need to do is to grab the value following idcategory=. Sometimes there are other querystring values following that, and my code works fine. But in the instances where it is the last querystring value, it fails on this error:
Microsoft VBScript runtime error '800a01f5'
Illegal assignment: 'gbdgCatQSwork'
originalurl = http://www.mydomain.com/store/pc/vie...p?idcategory=4
gbdgURLlen = 84 (this is the length of the entire URL)
gbdgURLlen2 = 1 (this is the length of the string that follows "idcategory=")
gbdgCatQSwork = mid(originalurl,gbdgURLlen-gbdgURLlen2,gbdgURLlen2)
What I want is that gbdgCatQSwork would contain the value (in this case "4") so that I can continue my process. Could someone please shed light upon what I am missing here?
View Replies
View Related
I'm trying to call a package/procedure in oracle (from an ASP page) which
requires a number of parameters. I have got this working using OO40 but
unfortunately the transaction rollback function doesnt seem to do much.
So I'm now trying to use ADO instead (in the hope that ADO transactions will
work), however I'm getting the above error. My initial searches havent
turned up any suitable suggestions - there appear to be many reasons why
this error might occur - none of which I have found so far fit my situation.
Can anyone suggest where I am going wrong? Better still, can anyone post a
working code snippet that I can use as a model? I already have another [very
similar] function which calls a different package/procedure which works
fine. Code:
View Replies
View Related
<% hour = Request("controlname") %> will yield the following error:
Microsoft VBScript runtime (0x800A01F5)
Illegal assignment: 'hour'
However, if I declare hour, then it is fine.
<%
Dim hour
hour = Request("controlname")
%>
But I think in VBScript,declaration of a variable is optional?That means we can use the variable without writing "Dim hour" ??
View Replies
View Related
My database (.mdb) has a 255 lenght text field, I need to insert the content of a request.form of not a text field, but a TEXTAREA:
---code---
<textarea name="comentario" rows="10" cols="50" wrap="PHYSICAL">
--end-code-
how can I limit the textarea to a max number of characters, like 255?
I think I should use any ASP code and a "there is an error" page, but I dont wonder how to made the sintaxis.
View Replies
View Related
I know we have this thread somewhere, but I can't seem
to find it now
I want to show the first 100 chars of a string, but
I don't want a word to be cut in half at the end, it must
show the whole word then and go a bit beyond 100 chars.
View Replies
View Related
This will be used for a comments system, comments will be displayed on the front page, and I want the field (Comment) to only display the first 300 or so chars
View Replies
View Related
I am having a probem with asp, xml, com while using chinese chars. The chinese letters come out of com fine and they are also fine when i use asp to write to a text file.
When i load the chinese chars into an xml dom they become invalid Chinese chars show as this æˆ'çš,,模æ?¿. but when i doa xsl translation then some of the chinese chars are displayed and some are shown as garbage chars. My ASP Page has the following headers
<%@Language=VBScript CodePage="65001"%>
<%
Response.CharSet = "UTF-8"
Response.ContentType = "text/html"
%>
My XSL has the following header <?xml version="1.0" encoding="UTF-8"?> ..
View Replies
View Related
Part of the content of one of our web pages uses wingdings and Chr(239)
through Chr(242) (which are little arrow outlines, though that's not really
important.)
It worked just fine in Windows 2000 Server, but now under Server 2003 it
seems that characters above 127 get converted somehow, and our code no
longer produces the desired effect.
Does anyone know how to make it send our content without modification, or
how to encode it in a way that it makes it out to the browser with the
intended character value (as opposed to some thoroughly useless conversion
to a 7 bit value)?
View Replies
View Related
I have an ASP function in place to strip invalid chars out of a data store
before I create an XML file of this data, but my function doesn't work on a
certain set of chars.
As far as I can see these are the following:
a) trademark char
b) long hyphen/dash char
c) smart/curly quotes (both left and right)
Even though my function is set up as follows: Code:
View Replies
View Related
I have a string
ASP Code:
Dim address
address = "C:Documents and Settingsob"
How do i delete the first 26 chars of so when i display this on screen it will only display bob and not C:Documents and Settingsob
View Replies
View Related
I have a form where the user enters a customer name, then clicks the submit
button which then adds it to a database. This works absolutely fine untill
the name has an apostrophe in it.
eg when the name entered is O'Hanlon and its submitted, I get this
error.....
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression ''O'Hanlon'
View Replies
View Related
I'd like to have a counter that tracks # of chars typed... so I don't risk having my message box truncated. Gonna be JS-based huh?
View Replies
View Related
I have an application that let's the user enter text into a textbox and this
data is collected on the server and stored in a database.
The page is multilingual and sets Response.Charset to the appropiate for the
language, for example gb2312 for chinese etc. This made all texts on the page
show up alright.
However, I did not change the codepage of the page so ASP encoded the post
data sent to the server and I have got really ugly texts for certain
languages.
I have had applications before doing the same thing where the page has been
able to decode the posted characters again when redisplaying them, but in
this case I haven't been able to get anything meaningful from them.
It seems to me that the encoded text depends on the charset used when
entering the text, entering chinese characters when using iso-8859-1 gives me
character codes like Ó’ which probably would be alright to convert but chinese
text that has been entered in the gb2312 charset look like this Code:
View Replies
View Related
i want to split a string containing unicode chars. If i use Split() funtion of ASP the unicode characters in string it gives wrong results..
Is there any other funtion or anyway through which i can split my unicode string to array?
HERE IS THE EXAMPLE FOR MY PROBLEM ------
i hav string in given form(sepated by a semi colon[;] )
ROOMS = Cap-Haitien;Gonaives;Jeremie;L’Artibonite;Grand-Gouave;
When i split this string using
Split(ROOMS, ";")
it gives me following results
Cap-Haitien
Gonaives
Jeremie
L’
Artibonite
Grand-Gouave
However it shud give me
Cap-Haitien
Gonaives
Jeremie
L’Artibonite
Grand-Gouave
Is there any solution to my problem?
View Replies
View Related
I have an ASP page that loops through a SQL Server 2000 table, then
downloads an Excel sheet the users can save, etc. Works fine, except, I see
that in one particular "comments" field the Excel sheet returns a #VALUE!
error in the cell when there is a large amount of text. I've looked through
the MSKB, MSDN and many ng posts to see if there is a workaround or solution
to this, inclduing looking at the xlWorksheet properties (I've tried
'xlWorksheet.Cells(iRow, 11).WrapText = True), played with Orientation, etc.
But to no avail.
View Replies
View Related
my problem is that i load an xml file (which displayed well in iexplorer standalone) with an asp file, and the page displays o instead of ő, u instead of ű, so my central european characters are changed. the xml well formed, and well encoded. i hope ;)
<?xml version="1.0" encoding="ISO-8859-2"?>
<tests>
<test>o</test>
<test>Å‘</test>
</tests>
View Replies
View Related
I have loads of text in russian chars that I need to put to a MySQL db (version is 3.23).
a) Is there some way to make MySQL db to accept russian chars?
b) If not, there must be ready-to-use functions to convert the russian chars to HTML-entities?
The site is done with ASP & VbScript, but of course JScript/Perl script based function suits well too. I've tried searching with Google too but thin results
The problem is that a person uses kind of a CMS where he/she can type different language versions of certain phrases. In practise there is a textarea type of field for all languages where he/she types the russian text which is then saved to a MySQL database.
View Replies
View Related
There i seem to be having a problem when inserting certain characters into my access database using a form, mainly (') characters.
View Replies
View Related
I get the following error message
Microsoft VBScript compilation error '800a03ee'
Expected ')'
/weblinkup/chat.asp, line 1775
oConn.Execute("INSERT into chat (username,nametext,roomname,type,priv,thetime,msg) VALUES ('" & username & "', '" & username & "', '" & Roomname & "', 'msg', '0', '" & now() & "', '" & username & " has just said " & emotetarget & "." ')")
what the problem is with the code?
View Replies
View Related
i have a database Access with Book Table and Author Table. now i have created a form which inserts info submitted into the Book Table, yet it keeps giving me this error "You cannot add or change a record because a related record is required in table 'Author' " while the names of the authors are all registered.
it works in Access but not in asp it doesn't make much sense. People just enter the names of the books which their authors are in the Author table. it keeps giving me error. how to know why this is so?
View Replies
View Related
I have an error as follows:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not bulk insert. File 'c:mydata.csv' does not exist.
My mydata.csv file is inside the directory i stated. But why does the server complains that the file is not fould?
My codings:
strSQL = "BULK INSERT NAME FROM 'c:mydata.csv' WITH (FIELDTERMINATOR = ',',ROWTERMINATOR =
'
')"
Response.Write ("test")
Set oRS = conn.Execute(strSQL)
View Replies
View Related
I had some Error when i write the update sqlp query
Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/fyp/Quiz/updateQuiz.asp, line 21, column 77
SQL_query= "update Activity_Status set UserID = '" +Request.Form("username") "'" "where Score = '" +Request.Form("QuizScore" + "'")"
Code:
SQL_query= "update Activity_Status set UserID = '" +Request.Form("username") "'" "where Score = '" +Request.Form("QuizScore" + "'")"
View Replies
View Related
I'm using ASP + MS SQL. I wrote a simple insert into command but nothing is happening... it gave no error and no information is stored in the db. When I response.write my SQL, I got the following:
INSERT INTO [blog_entries](title,user,entry,date) VALUES('test','admin','test','Tuesday, December 25, 2007')
View Replies
View Related
I'm wondering if it's possible to create an instance of an ADO Recordset and add values to it by ASP ??
Ex :
I have 2 arrays :
arr1 = Array(1,"allo")
arr2 = Array(2,"bonjour")
Is it possible to add these 2 arrays into a Recordset to manipulate de data more easily?
If yes, could you provide me with a little example to see the synthax, because I tried almost everything and it didn't worked at all
View Replies
View Related
how do i design my site interface such that users can insert smilies along with text in the form field just like it is here on sitepoint...
View Replies
View Related
i've tested my code and it seems to send back an error, when i'm trying to insert a record into my db (sql server)
Basically when I udpate one of the records it's fine ( I update at a certain "productID")
But when I insert a new record it sends back an error telling me that my "productID" can't be a null value?Any ideas on how to fix this?
View Replies
View Related
When I insert info into a DB from a form, it cuts the string off at the first apostrophe (").
How would I make it insert the data as-is, with the apostrophes? Here is the code used to insert the Data:
View Replies
View Related
I am developing web pages , therein doing database
connectivity using ASP with Microsoft Access.I want to
insert a file (.opt/.pmopt) into a field 'OLE Object'. Also
I want to display that file name in tabular form and a link
to download that file.
View Replies
View Related
I am trying to make a web-based front-end for one of our programs. I'm running into a problem. Here's a sample of one of our tables:
Code:
CaseNo ChargeCount ArrestCharge FiledCharge
123 1 13 13
123 2 14 14
199 1 03 03
The ChageCount column cannot have nulls and must be unique. is there a way when I'm adding a new charge, i can check to see if a chargecount exists? For example, if inserting a new record, it will first check if there is a chargecount, if there is not, it will make it 1. if there is a charge count, it will +1 to the existing chargecount
View Replies
View Related
Im doing a update page and noticed this error, whenever you want to write for example "can't, i've" it errors on submit, but characters like "." are okay. Why doesn't it like these characters and how can i make it like them? I need some extra code?
View Replies
View Related
I have the folllowing page where a user can add a review to the website. So far the page works fine, but on the review rating section I know that the rating is between 0 - 5.
But its posible for a user to enter 1000 if they wished, which still means the page works but the answer is too high.
Also if they write text in the field it errors the page. How do i code this so that they can only enter a number between 0 and 5 and only a number and not text.
View Replies
View Related