Hi

I m using the following code to insert the values in the Access 2000 database 
using ASP but it is not working.... 

<HTML>
<HEAD>
<TITLE>TEST</TITLE>
</HEAD>
<BODY>
<FORM NAME="ENTRY" METHOD="POST" ACTION="insert.asp">
NAME: <INPUT TYPE=TEXT NAME="name" VALUE="">
Roll No.; <INPUT TYPE=TEXT NAME="rollno" VALUE="">
<INPUT TYPE="SUBMIT" VALUE="INSERT">
<INPUT TYPE="RESET" VALUE="CLEAR">
</FORM>
</BODY>
</HTML>
I have saved this file as "insert.html"

<%
   Dim stname, qry, dbfile, Conn, rollno
 
name=request.form("name")
rollno=request.form("rollno")

dbfile=server.Mappath("db2.mdb")
 
set Conn=Server.Createobject("Adodb.Connection")
 
Conn.Connectionstring="Provider=Microsoft.Jet.Oledb.4.0;Data Source="& dbfile 
&";Persist Security 

Info=False"
 
Conn.open
 
qry="Insert into student(name, rollno) values('"& name &"', "& rollno &")"
 
Conn.execute(qry)
 
Conn.Close
 
Set Conn=Nothing
 
%>
I have saved this file as "insert.asp"

when i fill the form and press Insert Button then i get the message

The page cannot be displayedThere is a problem with the page you are trying to 
reach and it cannot be displayed.

Although these two pages and database all are saved in the same folder.

can any1 can help me out... Thanx in advance.....



                
---------------------------------
Yahoo! Mail Mobile
 Take Yahoo! Mail with you! Check email on your mobile phone.

[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to