|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
ever had trouble with ' (single quote) ?
some people may know this, but i just spent about an hour thinking of how i could insert data into my DB that contained apostrophes. for example, I wanted to insert Bailey's well, my SQL statement was being cut off when it hit the ' and i was getting all sorts of errors. i was writting some complex stuff to take out the ' then re-insert it when being displayed... blah. lots of work. then i thought, what if i replace my ' with " in my insert statement. guess what, it works!
like i said, some of you may know this, but i thought id share my experience with you just in case someone runs across the same problem. ![]() |
|
#2
|
||||
|
||||
|
Do you hand code?
I used DWMX and notice it used ASP's Replace function to do the same thing. It was at that point that I looked into it and learned how apostrophes can break SQL code, and things like SQL Injection protection. It's good knowledge to know! SQL IS a Microsoft Technology. So it's good to know as many loopholes as you can; cause as long as M$ makes software, there will always be loopholes, bugs and errors. |
|
#3
|
|||
|
|||
|
yes i code in notepad :-)
|
|
#4
|
|||
|
|||
|
Actually, SQL server is a Microsoft technology. SQL (Structered Query Language) was originally developed by IBM, and is used in most relational db's.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > ever had trouble with ' (single quote) ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|