using SQL Server 2000, SP3
Hi all,
I'm struggling with calling a function that I wrote within an ActiveX task. The ActiveX task parses a text file and then inserts the records into a table using ADO. I wrote a function that uses the replace function to replace a single apostrophe with two apostrophes, so that strings with apostrophes can be inserted into a table.
Funtion I am trying to call:
I am trying to call the function using the following code:
I'm hoping you guys can help point me in the right direction.
Thanks in advance,
Jim
Hi all,
I'm struggling with calling a function that I wrote within an ActiveX task. The ActiveX task parses a text file and then inserts the records into a table using ADO. I wrote a function that uses the replace function to replace a single apostrophe with two apostrophes, so that strings with apostrophes can be inserted into a table.
Funtion I am trying to call:
Code:
Function CleanseString(strFieldName)
If InStr(1, strFieldName, "'") Then
strFieldName = Replace(strFieldName,"'","''")
End If
End Function
I am trying to call the function using the following code:
Code:
strField1 = Call CleanseString strField1
I'm hoping you guys can help point me in the right direction.
Thanks in advance,
Jim