Error Parsing Query - Help

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
 
H

Harry Simpson

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

The O'Reily is in a string field.

Harry
 
H

Harry Simpson

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
 
H

Harry Simpson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top