Click here to Skip to main content
15,894,896 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Actually am having a form with some fields, where user can enter some data.
Entered data will be passed to another asp file on submitting, where am inserting into a database. Though it is showing updated, it is not stored in database..

XML
<%@ Language=VBScript %>
<% Response.Buffer = true %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<form action = "" method = "post">
<%
Dim rs
        set rs = Server.CreateObject ("ADODB.Recordset")
        rs.CursorType = 2
        rs.LockType   = 3
        rs.Open "details", "DSN=Personal" 'adOpenKeyset,adLockOptimistic
        rs.AddNew
        rs("Name")          = Request.Form ("name")
        rs("Family_Income") = Request.Form ("income")
        rs("Gender")        = Request.Form ("gender")
        rs("DOB")           = Request.Form ("dob")
        rs("Guardian")      = Request.Form ("guardian")
        rs("Height")        = Request.Form ("height")
        rs("Occupation")    = Request.Form ("occupation")
        rs("Color")         = Request.Form ("color")
        rs("Caste")         = Request.Form ("caste")
        rs.Update
        rs.Close
        set rs= nothing
        Response.write("Updated")

%>

<P>&nbsp;</P>
</form>
</BODY>
</HTML>
Posted
Updated 30-Apr-10 19:16pm
v2

 
Share this answer
 
Are you using adovbs.inc for ADO connection or not? Please use this file. You can download it any from searching in web.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900