468,540 Members | 1,669 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,540 developers. It's quick & easy.

Not able to insert new records

Actually am having a asp form and there some fields are there..If we enter values in that fields and hit a button means values will be posted to another asp file where am trying to store the values in database (MS ACCESS). Though it is showing updated, the values are not stored in database..

My updating code is as follows

Expand|Select|Wrap|Line Numbers
  1.  
  2. <%@ Language=VBScript %>
  3. <% Response.Buffer = true %>
  4. <HTML>
  5. <HEAD>
  6. <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
  7. </HEAD>
  8. <BODY>
  9. <form action = "" method = "post">
  10. <%
  11. Dim rs            
  12.         set rs = Server.CreateObject ("ADODB.Recordset")
  13.         rs.CursorType = 2
  14.         rs.LockType   = 3
  15.         rs.Open "details", "DSN=Personal" 'adOpenKeyset,adLockOptimistic  
  16.         rs.AddNew 
  17.         rs("Name")          = Request.Form ("name")
  18.         rs("Family_Income") = Request.Form ("income")
  19.         rs("Gender")        = Request.Form ("gender")
  20.         rs("DOB")           = Request.Form ("dob")
  21.         rs("Guardian")      = Request.Form ("guardian")
  22.         rs("Height")        = Request.Form ("height")
  23.         rs("Occupation")    = Request.Form ("occupation")
  24.         rs("Color")         = Request.Form ("color")
  25.         rs("Caste")         = Request.Form ("caste")
  26.         rs.Update
  27.         rs.Close 
  28.         set rs= nothing
  29.         Response.write("Updated")
  30.  
  31. %>
  32.  
  33. <P>&nbsp;</P>
  34. </form>
  35. </BODY>
  36. </HTML>
  37.  
  38.  
  39.  
Attached Files
File Type: zip Joshua.zip (13.4 KB, 48 views)
Apr 30 '10 #1
1 1213
jhardman
3,405 Expert 2GB
hmm, that sure sounds to me like it should work. There is no error generated? how many records are in the db?

Jared
May 6 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

10 posts views Thread by shank | last post: by
3 posts views Thread by Andrew Bourne | last post: by
11 posts views Thread by Sezai YILMAZ | last post: by
1 post views Thread by cefrancke | last post: by
8 posts views Thread by jking482 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.