You need to reassign the value of mySql back to mySql when you add something. Take a look at this:
mySQL = "INSERT INTO Transactions_TransactionLogJSForm
(TransactionType, TotalAmount, Name, CompanyName,";
mySQL = "ResponseType, ResponseCode, ResponseDescr, AuthCode,
TraceNo) VALUES(arrValues(0)=ParseString (strMsg,"pg_transaction_type="),";
When these two lines are processed, mySql contains only the last line.
So, at the end, when you execute mySql, this is what gets executed:
arrValues(7)=ParseString(strMsg,"pg_authorization_ code="), arrValues(8)=ParseString(strMsg,"pg_trace_number=" ))
Which, of course, doesn't make much sense.
Try something like:
mySql = mySql & "bla bla bla"
Also, you should drop the semi colons at the end of each line. This is
VB Script which doesn't use the semi colon.
And more:
mySQL = "arrValues(7)=ParseString(strMsg,"pg_authorization _code="), arrValues(8)=ParseString(strMsg,"pg_trace_number=" ))";
Doesn't make sense, probably.
I think you're trying to get the item with index 7 from an array. However, with thos code you're assigning the
text arrValue(7) to the mySql variable.
This should probably something like:
mySql = mySql & arrValues(7) & "whatever"
Finally, if you do post pages like this, can you specify what error you get? "it does not produce the wanted result" isn't really helping us to help you.
I don't want to sound rude, but if I were you I'd get a book about ASP and databases. It looks like you're lacking some fundamental concepts in ASP, VBScript, JavaScript and database access.....
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to:
Stockholm Syndrome by
Muse (Track 5 from the album:
Absolution)
What's This?