This topic is locked
[SOLVED]

 Insert Record into another table

12/10/2012 4:27:06 AM
ASPRunnerPro General questions
A
adnankmk author

I want to insert the records into another table. I used the following code to insert the values.
'** Insert a record into another table ****

set dal_table=dal.Table("MIS")

dal_table.name="Value1"

dal_table.Add()
When I add record in the add page I found the following error.
Microsoft VBScript runtime error '800a01a8'
Object required: 'dal.Table(...)'
/erp/LGCD_Employees_add.asp, line 0
Can Anybody help me to resolve the issue.

G
gdmacdo 12/10/2012

Your second line:

dal_table.name="Value1"
Is NAME the name of the field in the MIS table? If so, are you hard coding the word "Value1"?
Typically, your After Record Added event should look like:
set dal_table=dal.Table("MIS")

dal_table.field_name_of_MIS_table=values("value_of_field_from_table_you_just_saved")

dal_table.Add()



I want to insert the records into another table. I used the following code to insert the values.
'** Insert a record into another table ****

set dal_table=dal.Table("MIS")

dal_table.name="Value1"

dal_table.Add()
When I add record in the add page I found the following error.
Microsoft VBScript runtime error '800a01a8'
Object required: 'dal.Table(...)'
/erp/LGCD_Employees_add.asp, line 0
Can Anybody help me to resolve the issue.

Sergey Kornilov admin 12/10/2012

Also, you need to make sure that MIS table is part of your project. DAL objects are only generated for project tables.

A
adnankmk author 12/10/2012

Thanks for reply. The problem is solved. I did not added the table in the project. After adding the table the problem is resolved.
Thanks

A
adnankmk author 12/10/2012

Thanks for reply. The problem is solved. I did not added the table in the project. After adding the table the problem is resolved.
Thanks