Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: How to insert data


Message #1 by "Mitten" <mittenshah@h...> on Sat, 11 Aug 2001 22:39:04
I am having a nightmare inserting data into my database. I have a form 

which consists of about 10 text fields. Few of these fields correspond to 

one table in the database and the other fields to other tables. Now when i 

use the following code to test whether it updates records in two tables 

the data is not inserted.



Here's part the code



<%

Dim rsUsers, rsUsers1



Set rsUsers = Server.CreateObject("ADODB.Recordset")

rsUsers.Open "Author", strConnect, 

adOpenForwardOnly,adLockOptimistic,adCmdTable



Set rsUsers1 = Server.CreateObject("ADODB.Recordset")

rsUsers1.Open "Journal", strConnect, 

adOpenForwardOnly,adLockOptimistic,adCmdTable



rsUsers("FName") = Request.Form("FName")

rsusers("LName") = Request.Form("LName")

rsUsers1("Journal") = Request.Form("Journal")





rsUsers.Update

rsUsers.Close

Set rsUsers = Nothing





rsUsers1.Update

rsUsers1.Close

Set rsUsers1 = Nothing

%>


  Return to Index