Error Parsing Query - Help

  • Thread starter Thread starter Harry Simpson
  • Start date Start date
H

Harry Simpson

I've got a person in my database named O'Reily. I think the ' is screwing
things up.

When I try to fill a dataset with the results of a query it doesn't
immediately error out...

Only on the line where I actually Close the connection AFTER the fill takes
place do i get the Error

"There was an error parsing the query."
Minor error 25501
Err. Par. Reilly

And ideas how i can work around this??

TIA

Harry
 
Thanks but this is the result set of a Select * from sql statement.

The O'Reily is in a string field.

Harry
 
Crazy thing is it gets the value into the dataset just fine.

Only when i close the connection do i get the error.

Why is this??

Harry
 
SOLVED - it was an error on insert at a later part of the app but looked
like it was happening on the close.

Solution was to
PatientName= "O'Reily"
PatientName = Replace(PatientName, "'", "''")

Thanks
Harry
 
Back
Top