473,396 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Apostophe not Accepting

nitindel
Hi all,
Greetings..!!

I am using ASP VB script and SQL Server 2005 on Backend...

I have taken the Text as a datatype....

But when we submit the form it is not entering APSOTROPHE(') in the database and hence thrwing the error.

and throwing this error::
Microsoft OLE DB Provider for SQL Server error '80040e14'

Line 1: Incorrect syntax near 'Story'.

The control is a HTML control like this:
<textarea name="txtstory" cols="100" rows="10" id="textfield3"><%=rsEditStory.fields("story")%></textarea>

Please let me know what can be the errors??

Thanks & Regards
Feb 20 '08 #1
2 1045
DrBunchman
979 Expert 512MB
Hi Nitindel,

Your problem is that SQL Server uses apostrophe's as string delimiters (they mark the beginning and end of strings). If you want to include apostrophe's in the data you insert in a database you must use a double apostrophe. Do a replace on your input string before you run your insert statement like so:

sInput = Replace(sInput, "'", "''")

This should fix your problem.

Hope this helps,

Dr B
Feb 20 '08 #2
Hi Nitindel,

Your problem is that SQL Server uses apostrophe's as string delimiters (they mark the beginning and end of strings). If you want to include apostrophe's in the data you insert in a database you must use a double apostrophe. Do a replace on your input string before you run your insert statement like so:

sInput = Replace(sInput, "'", "''")

This should fix your problem.

Hope this helps,

Dr B

Thanks a Lot...!!!!!


It worked..!!!
Feb 20 '08 #3

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

Similar topics

30
by: Stephen Ferg | last post by:
I have a question that is not directly Python-related. But I thought I'd ask the most erudite group that I know... :-) When did Windows start accepting the forward slash as a path separator...
0
by: Jacob Hallen | last post by:
Europython 2005 is now accepting talk submissions! Find out more at http://www.europython.org Just as last year, we have a Refereed Paper Track. Last day for proposing a refereed paper is 22...
9
by: Jenta | last post by:
A World Beyond Capitalism 2005, An Annual International Multiracial Alliance Building Peace Conference Is Accepting Proposals... ...and Online Registration is now available if you plan to table...
2
by: Rikkert | last post by:
I am trying to make an Edit control that accepts only numbers and one point (i.e. only accepting input of type 'double' or 'float'). Can this be done without using MFC? The standard options for...
4
by: briano | last post by:
I can get my setup application to display a dialog and pass entered values to the Installer class of my app. How do I get this from the Command-Line? Currently, setting ENVNAME1=QA, just as I...
4
by: MattBell | last post by:
I've tried to search for an answer to this without much success, and I think it's probably a common thing to do: I have a web service I want to accept an XmlDocument as an argument which conforms...
9
by: Jim Langston | last post by:
This is something I've been thinking about creating, and am trying to get the pieces together. I want to be able to assign values in a method accepting different types. I.E. ...
1
by: 123456prakash | last post by:
PGDRIVER=org.postgresql.Driver PGURL=jdbc:postgresql://172.18.1.19:5432/test I am try to connect to pgsql but i am getting this error in windows XP Connection refused. Check that the hostname...
2
by: Vbbeginner07 | last post by:
Hi all Wonder if anyone can help me out to solve this: please find the code of textbox that accepts only characters and one textbox that accepts only numbers: (vb) textbox for accepting...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.