I want to make a log function in ASP and to do that I need to be able to parse the UPDATE sql statement.
If i have a SQL statement like this:
UPDATE mytable SET aaa='test',bbb=123 WHERE id=508
What I want to get as an output is to arrays saying fields and values like this:
FieldArray = aaa,bbb
ValueArray = test,123
How can i do this in ASP or maybe directly in SQL?
Forget about using SQL. It’s role is to use, access and modify data on a databases server.
In VB.NET, you could use the
Left,Mid,RightandInStrfunctions to parse out your SQL string.This has more information on the functions.
Here is a procedure I made for your problem :