I have the following code, which inserts into a database a record with a primary key named System_ID.
What I’d like to do is after it has inserted take the value for the System_ID and insert a record in a new table so something like this?:
Can anyone help me?
Thanks.
Code:
For i = 0 to Ubound(val)
if len(val(i))=2 then
str_SQL = "INSERT INTO System ([BusinessID], [System Code], [System Description])"
str_SQL = str_SQL & " VALUES "
str_SQL = str_SQL & "('" & first_part & "', '" & val(i) & "', '" & "System Code " & val(i) & " for Business " & second_part & "')"
else
Response.Redirect("index.asp?a=Only two character inputs can be accepted&p=" & input &"")
end if
What I’d like to do is after it has inserted take the value for the System_ID and insert a record in a new table so something like this?:
Code:
str_SQL = "INSERT INTO System_Text ([SystemID])"
str_SQL = str_SQL & " VALUES "
str_SQL = str_SQL & "('" & NewID & "')"
Can anyone help me?
Thanks.