This topic is locked

events

3/14/2006 4:40:42 PM
ASPRunnerPro General questions
Sarjent author

I am having questions with events

On Before Record is updated I am liking to use 'Add record to another table' on both Edit and Add pages

I give the table name temp_storage

the field name I type is 'SRVNAME', 'DISTSCHED'

What exactly should I be putting for the values? I've just been entering the same field names but no luck.
I get a error at Line 1. incorrect syntax near ','.
Could somone explain this to me a little?

Sergey Kornilov admin 3/15/2006

Hi,
see my example below:

Function BeforeAdd(dict)

strSQLInsert = "insert into new_temp_storage (newSRVNAME, newDISTSCHED) values ('"&

dict("SRVNAME")&"','"& dict("DISTSCHED")&"')"

dbConnection.Execute strSQLInsert
BeforeAdd = True



where newSRVNAME, newDISTSCHED are field names in new_temp_storage table, a record will insert in.

Sarjent author 3/15/2006

Thanks
It is somewhat working. Its entering the SRVNAME into NEWSRVNAME but DISTSCHED is not being entered into NEWDISTSCHED.

Sergey Kornilov admin 3/16/2006

Please zip and send generated ASP files to support@xlinesoft.com along with project file and your sample database for investigation.

Sarjent author 3/17/2006

Please zip and send generated ASP files to support@xlinesoft.com along with project file and your sample database for investigation.


will do, I'll have to create a copy and wipe the sensitive data before I can.