HI , Daniweb
i have two tables Guarantor and Loan1. when i insert into Guarantor all the values for table is inserted except stud_id which is the foreign key for this table from student_tb table. The value for stud_id shows 0 or zero.
EX of code:
if request.QueryString("id")<>"" then
stud_id = request.QueryString("id")
end if
conn.Execute " insert into Guarantor values('" & stud_id & "', '" & guarantor & "', '" & relation & "', '" & IC & "', '" & birth & "','" & age & "','" & citizen & "','" & work & "','" & salary & "', '" & phone & "','" & hse_add & "','" & office_add & "','" & office_phone & "','" & office_fax & "', '" & guarantor1 & "', '" & relation1 & "', '" & IC1 & "','" & birth1 & "','" & age1 & "','" & citizen1 & "','" & work1 & "','" & salary1 & "','" & phone1 & "','" & hse_add1 & "','" & office_add1 & "','" & office_phone1 & "','" & office_fax1 & "')"
rs1.Open " select * from Guarantor where stud_id = '" & stud_id & "'", conn, 1,2
The same goes for Loan1 table :mad:
if not rs1.EOF then
rs1.MoveLast
end if
s = rs1.Fields("stud_id")
conn.Execute "insert into Loan1 values('" & s & "', '"& st_loan &"', '"& loan1 &"', '"& loan2 &"', '"& loan3 &"','"& loan4 &"','"& loan5 &"','"& st_amt &"','off','off','off','off','off','off','off','off','off','No')"
conn.Execute "update student_tb set loan_approve = ('" & app & "') where stud_id = ('" & s & "')"
Plz help me out !! thank you.