Hi. I've built a shared table to track errors from all users but I'm running into a problem. I populate this table with an SQL command. Many, maybe even most, errors have protected characters such as the apostrophe (') or a quote (") in them. To get arround this if there is a protected character it isn't logging the error description, just the number.
Really I'm only having problems with the "err_string ", the text description of the error.
I'd really like to keep the description if at all possible. Some of them are really handy to fixing problems.
Any good ways arround this?
If I use ADODB won't I run into the same set of problems?
Sorry my question isn't better formed. I really don't know a better way to say it though.
Carl
Code:
DoCmd.RunSQL "INSERT INTO ErrLog ( [User], ErrorNum, AddDesc, ErrorDesc, [Module], Function, ErrSection, VNum, VTime ) " & _ "SELECT '" & VBA.Environ$("USERNAME") & "' AS E1, " & ErrNum & " AS E2, '" & user_string & "' AS E3, '" & _ err_String & "' AS E4, '" & Module & "' AS E5, '" & Proceedure & "' AS E6, " & errSection & " AS E7, " & vRS![VNum] & " as E8, " & Now() & " as E9;"
I'd really like to keep the description if at all possible. Some of them are really handy to fixing problems.
Any good ways arround this?
If I use ADODB won't I run into the same set of problems?
Sorry my question isn't better formed. I really don't know a better way to say it though.
Carl
Comment