Hi,
VB6.0, ADO2.5, winNT
I'm looking for strings in my tables by using the .find method on a recordset:
------------------------------------------------------------
tmp = "IFREMER Station de la Rochelle-L'Houmeau,17137"
Rst.Find "name='" & Replace(tmp, "'", "''" & "'"
------------------------------------------------------------
Here there is 1 single quote (') and the replace statement replaces this with 2 single quotes (''). This works fine. BUT:
------------------------------------------------------------
tmp = "IFREMER Station de la Rochelle-L'Houmeau,17137,L'Houmeau"
Rst.Find "name='" & Replace(tmp, "'", "''" & "'"
------------------------------------------------------------
Here there is 2 single quotes in the string (tmp). And the .find method raises and error: 3001, Agruments are of the wrong type, ... bla bla
What am I doing wrong here?
Sunaj
VB6.0, ADO2.5, winNT
I'm looking for strings in my tables by using the .find method on a recordset:
------------------------------------------------------------
tmp = "IFREMER Station de la Rochelle-L'Houmeau,17137"
Rst.Find "name='" & Replace(tmp, "'", "''" & "'"
------------------------------------------------------------
Here there is 1 single quote (') and the replace statement replaces this with 2 single quotes (''). This works fine. BUT:
------------------------------------------------------------
tmp = "IFREMER Station de la Rochelle-L'Houmeau,17137,L'Houmeau"
Rst.Find "name='" & Replace(tmp, "'", "''" & "'"
------------------------------------------------------------
Here there is 2 single quotes in the string (tmp). And the .find method raises and error: 3001, Agruments are of the wrong type, ... bla bla
What am I doing wrong here?
Sunaj