p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_databases thread: No value given for one or more parameters.


Message #1 by "Elodie Mechineau" <elodie_mechineau@h...> on Thu, 06 Jun 2002 03:11:09 +0200

Hi !

I just begin to work with ASP files. I have tested my connection to the 
database and it works but when I want to register data from a form in the 
database, my server gives me this :
"No value given for one or more required parameters." The line correspond to 
the line where is the request.

Do you have an idea of the problem ? Thanks you in advance,

Elodie

Below my code which receive the data from the form:

<%@ LANGUAGE = JScript %>
<%   Response.Expires= -1 %>
<!--METADATA TYPE="typelib"
uuid="00000205-0000-0010-8000-00AA006D2EA4" -->


<HTML>
     <HEAD>
         <TITLE>Add Database </TITLE>
     </HEAD>
     <BODY BGCOLOR="Mocassin" topmargin="10" leftmargin="10">
         <H4>Add Database Sample</H4><br>
           <%
		var oConn;
		var oRs;
		var filePath;
		// Map the database to physical path
		filePath =Server.MapPath("../db1.mdb");
		// Create ADO Connection Component to connect with sample database
		oConn = Server.CreateObject("ADODB.Connection");
		oConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+filePath);

		var lens= Request.Form("nameLens2");
		var centerx=Request.Form("centerx");
		var centery=Request.Form("centery");
		var rad=Request.Form("radius");
		var sql="insert into lens (Name,Centerx, Centery, Radius) values 
("+lens+", "+centerx+", "+centery+", "+rad+")";
		if( lens!="" && centerx!="" & centery!="" && rad!="") {
					oConn.Execute (sql);
		}
	%>
     </BODY>
</HTML>

_________________________________________________________________
Rejoignez le plus grand service de messagerie au monde avec MSN Hotmail. 
http://www.hotmail.com


  Return to Index