Forums
This topic is locked
Insert COMMAND
Posted 29 Jul 2001 21:15:59
1
has voted
29 Jul 2001 21:15:59 Oliver Saager posted:
Hi! I created an Insert Command but always get this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver]
Too few parameters. Expected 1.
This is the code I wrote:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/SAAGER_CONTENT.asp" -->
<%
if(Session("tprojekt" <> "" then cmdtracking__projekt =
Session("tprojekt"
set cmdtracking = Server.CreateObject("ADODB.Command"
cmdtracking.ActiveConnection = MM_SAAGER_CONTENT_STRING
cmdtracking.CommandText = "INSERT INTO tbl_logeduser (fld_logeduserprojekt)
VALUES (" + Replace(cmdtracking__projekt, "'", "''" + " "
cmdtracking.CommandType = 1
cmdtracking.CommandTimeout = 0
cmdtracking.Prepared = true
cmdtracking.Execute()
%>
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="/main/styles" type="text/css">
</head>
<body text="#FF9900" bgcolor="#999999">
</body>
</html>
In the Database, the table contains the following fields:
ID = Auto-Value
fld_logeduserprojekt = Text
These are the only two fields and I can guarantee you: The spelling of table/field is correct as well as the session("tprojekt" is not empty...
Thank you for your Help!