|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
This is the code I use for a Sql Query.Now the problem is certain records have an Apos (eg:Ert'456) now this gives an error.IS there any way we can by pass
this error.Replacing the single Apos with 2 double quotes sometimes helps but is not a permanent solution.Please help me with this. sql = "select *" sql = sql & " from Path_provider " sql = sql & "where " sql = sql & " Emp_id = '" sql = sql & Emp_number & "'" sql = sql & " and " sql = sql & " Doc_type = '" sql = sql & Doc_type & "'" sql = sql & " and " sql = sql & " location_of_files = '" sql = sql & location & "'" |
|
#2
|
|||
|
|||
|
With MS databases you need to double up single quotes in a sql string.
"select stuff from table where theName = O''Conner"
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
But how do I use this case in SQl Server..because certain cases I need to display the values and it gives an error because of the apos.
|
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Problem with Apos |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
![]() |
|