Click to See Complete Forum and Search --> : Same Problem Again...
hally
02-21-2006, 09:47 PM
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] The INSERT INTO statement contains the following unknown field name: 'ANGGARANT'. Make sure you have typed the name correctly, and try the operation again.
/SYSTEM VOT/viewperuntukan1.asp, line 21
i had face this problem again and again.. i dont know why... i had re-check and re-write the program but it still the same.. although i had change that 'ANGGARANT' field to other name like 'TAMBAHAN' but there was still an error.. and the error will be like this..
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] The INSERT INTO statement contains the following unknown field name: 'TAMBAHAN'. Make sure you have typed the name correctly, and try the operation again.
/SYSTEM VOT/viewperuntukan1.asp, line 21
i dont know why.. other fields is ok... only this field ( ANGGARANT).. when i delete it, no problem exist.. but this table is important..
i hope someone can help me.. thank you
buntine
02-21-2006, 10:01 PM
Can you show us some of your code? Escpecially line 21 and some of the lines above and below it.
Regards.
hally
02-21-2006, 10:17 PM
ok..
1st code: new1.asp ( this a form for user to key in their data )
<html>
<head>
<title>SISTEM VOT BARU</title>
</head>
<script language = JavaScript>
function verify()
{ document.returnValue = true;
//check for blanks
if (document.myForm.novot.value == "")
{
alert (" Sila masukkan No Vot!");
document.returnValue = false;
}
if (document.myForm.tahun.value == "")
{
alert (" Sila masukkan Tahun!");
document.returnValue = false;
}
if (document.myForm.peruntukan.value == "")
{
alert (" Sila masukkan Peruntukan Tahunan!");
document.returnValue = false;
}
}
</script>
<BODY BGCOLOR="#000000">
<CENTER>
<IMG SRC="banner.jpg">
</cENTER>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<font face="Verdana, Tahoma">
<FORM NAME="myForm" method="post" ACTION ="viewperuntukan1.asp" onSubmit="verify(); return document.returnValue">
<TABLE BORDER="1" CELLPADDING="1" CELLSPACING="0" ALIGN="CENTER" VALIGN="TOP" WIDTH="95%"><TR><TD BGCOLOR="black">
<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="1" WIDTH="100%">
<TR ALIGN="LEFT">
<TD BGCOLOR="99CCFF" width=25%><font size="2" face="Verdana, Tahoma"><b>No Vot :<b></TD>
<TD BGCOLOR="99CCFF"><font size="2" face="Verdana, Tahoma">
<INPUT TYPE= "TEXT" name="novot" MAXLENGTH="32" SIZE="20">
</TD>
</TR>
<TR ALIGN="LEFT">
<TD BGCOLOR="99CCFF" width=25%><font size="2" face="Verdana, Tahoma"><b>Tahun :<b></TD>
<TD BGCOLOR="99CCFF"><font size="2" face="Verdana, Tahoma">
<INPUT TYPE= "TEXT" name="tahun" MAXLENGTH="32" SIZE="5">
</TD>
</TR>
<TR ALIGN="LEFT">
<TD BGCOLOR="99CCFF" width=25%><font size="2" face="Verdana, Tahoma"><b>Peruntukan Seperti Di Dalam Anggaran Tahunan ( RM ) :<b></TD>
<TD BGCOLOR="99CCFF"><font size="2" face="Verdana, Tahoma">
<INPUT TYPE= "TEXT" name="peruntukan" MAXLENGTH="32" SIZE="20">
</TD>
</TR>
<TR ALIGN="LEFT">
<TD BGCOLOR="99CCFF" width=25%><font size="2" face="Verdana, Tahoma"><b>Peruntukan Seperti Di Dalam Anggaran Tambahan ( RM ) :<b></TD>
<TD BGCOLOR="99CCFF"><font size="2" face="Verdana, Tahoma">
<INPUT TYPE= "TEXT" name="ptambahan" MAXLENGTH="32" SIZE="20">
</TD>
</TR>
<TR ALIGN="LEFT">
<TD BGCOLOR="99CCFF" width=25%><font size="2" face="Verdana, Tahoma"></TD>
<TD BGCOLOR="99CCFF"><font size="2" face="Verdana, Tahoma">
<P ALIGN=CENTER>
<B>
<INPUT TYPE="SUBMIT" VALUE="SUBMIT" NAME="SUBMIT">
<INPUT TYPE="RESET" VALUE="RESET" NAME="RESET">
</B>
</TD>
</TR>
</TABLE></TR></TD></TABLE>
</FORM>
</FONT>
<BR>
<BR>
<BR>
<BR>
<BR>
<FONT FACE="Verdana, Tahoma" SIZE="-2" COLOR="white">
<br>
<CENTER>Copyright Reserved 2006</a>
</CENTER>
</FONT>
</FONT>
</BODY>
</HTML>
2nd code : viewperuntukan1.asp ( to show the total after the user key in their budget ( ptambahan and peruntukan )
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<% @Language="Javascript" %>
<%
var dsn="dsn=VS";
var Conn=
Server.CreateObject("ADODB.Connection");
Conn.Open(dsn);
var no_vot = Request.Form("novot");
var thn = Request.Form("tahun");
var tmbh = Request.Form("ptambahan");
var peruntukanthnn = Request.Form("peruntukan");
var total = peruntukanthnn + tmbh
var sql = "Insert into KE (NOVOT, TAHUN, ANGGARANT, PERUNTUKAN, BUDGET) VALUES ('"+no_vot+"','"+thn+"','"+tmbh+"','"+peruntukanthnn+"','"+total+"');"
Conn.Execute(sql);
Conn.Close();
Conn=null;
%>
<HTML>
<HEAD>
<TITLE>JUMLAH PERUNTUKAN TAHUNAN</TITLE>
</HEAD>
<link rel="stylesheet" type="text/css" href="images181/blue.css">
<BODY BGCOLOR="#000000">
<CENTER>
<IMG SRC="banner.jpg">
</cENTER>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<FONT face="Verdana,Tahoma" COLOR="white">
<CENTER>
<P>Peruntukan bagi Tahun <%=Request.Form("tahun") %> ialah RM <%=Request.Form("ptambahan")%>+<%=Request.Form("peruntukan")%>
</P>
</CENTER>
</FONT>
<FONT face="Verdana,Tahoma" SIZE="3">
<ALIGN="RIGHT">
<BR>
<BR>
<P>
<A HREF="addnew1.asp">seterusnya>>>></A>
</P>
</ALIGN>
</FONT>
<BR>
<BR>
<BR>
<FONT FACE="Verdana, Tahoma" SIZE="-2" COLOR="white">
<br>
<CENTER>Copyright Reserved 2006</a>
</CENTER>
</FONT>
</BODY>
</HTML>
please help me.. i dont know why this happen...
Gaurav Khanna
02-24-2006, 03:14 AM
well the column name u mention( 'ANGGARANT') in insert statement is either u write it wrong spelling or this column doen't exit in the table (KE).
check the spelling of the column name or see whether the column in the table or not
ProWeb
02-24-2006, 03:24 AM
Should the quotes be around ANGGARANT in the sql statement?
What type of field is this in the database, text, number etc?
hally
02-24-2006, 10:22 PM
hi..
ANGGARANT , PERUNTUKAN and BUDGET is in data type Currency in my database Microsoft Access..