Ok, on this line
Code:
strSQL = strSQL & "VALUES(arrValues(0)=ParseString(strMsg, "pg_transaction_type="),"
what u have at the mo will just write the literal string "arrValues(0)=ParseString..." into the SQL. but what u really want to do is write the value of whatever is returned by ParseString(strMsg, "pg_transaction_type=") into the SQL, here's how you do it:
Code:
strSQL = strSQL & "VALUES('" & ParseString(strMsg, "pg_transaction_type=") & "',"
then u repeat that for each field. A few things to watch out for:
- if the field type is numeric u don't put '' around the value
- don't add the , after the last field (obvious I know, but easy to miss)
- if any of the values have ' inside them u need to Replace that with ''
If u still have probs add "Response.Write strSQL" just before the execute, then u can see exactly what you're sending to the db.
Personally, I would put all this in a stored procedure and run it using a Command object and named parameters - much easier to see what's going on then.
hth
Phil