I'm hoping this is a very simple question ...
I've made an agent that connects to an SQL Server via ODBC. I am iterating through the documents in a view and inserting important data into an SQL Server table.
Now, logically, problems arise if a field contains an SQL string delimiter character, namely, the single quote --> ' <--
I made a function to replace all occurrences of ' in a string with '' (i.e. two single quotes) and thought I was really clever ...
Function KillQuotes(srcStr As String) As String
KillQuotes = Evaluate (|@ReplaceSubString(| & srcStr & |;"'";"''")|)
... but it doesn't work ! I just get a type mismatch error. I don't really understand where the error is.
I am using Lotus Notes 4.6.2. Please help me get the KillQuotes function working correctly!