G
Guest
can someone suggest a better implementation than my sqlescaptestr function
below?
unfortunately this function throws an outofmemoryexception when i am
inserting multiple rows in a loop (str in such cases can be quite large...
could be upwards of 100K in some cases).
i suppose the loop isn't allowing for the garbage collector to collect... i
could throw a GC in there, but I was hoping for a more memory efficient
function.
Public Shared Function sqlescapestr(ByVal str As String) As String
' replaces ' with ''
str = str.Replace("'", "''")
Return str
End Function
below?
unfortunately this function throws an outofmemoryexception when i am
inserting multiple rows in a loop (str in such cases can be quite large...
could be upwards of 100K in some cases).
i suppose the loop isn't allowing for the garbage collector to collect... i
could throw a GC in there, but I was hoping for a more memory efficient
function.
Public Shared Function sqlescapestr(ByVal str As String) As String
' replaces ' with ''
str = str.Replace("'", "''")
Return str
End Function