473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

How to fix access too few parameters error?

Hi friend

Please tell me why this error is occured

ERROR [07002] [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 22.

Cod

Dim InsertString As String = "INSERT INTO TableHR1 VALUES(@No,@name_of_candidate,@Address,@Date_of_bi rth,@PhoneNo,@Email,@Design_Eng,@CAE_Eng,@Mkt,@Acc ounting,@It,@Admin,@Experience,@Industry,@Current_ CTC,@InHand,@ExpectedCTC,@Exp_Inhand,@Joining_Peri od,@Iziel_Result,@Iziel_Remark,@Candidate_Remark) "
Dim cmd As OdbcCommand = New OdbcCommand(InsertString, con)

cmd.Parameters.Add(New OdbcParameter("@No", notxt.Text))
cmd.Parameters.Add(New OdbcParameter("@name_of_candidate", nametxt.Text))
cmd.Parameters.Add(New OdbcParameter("@Address", Addresstxt.Text))
cmd.Parameters.Add(New OdbcParameter("@Date_of_birth", DateOfBirthtxt.Text))
cmd.Parameters.Add(New OdbcParameter("@PhoneNo", Phonetxt.Text))
cmd.Parameters.Add(New OdbcParameter("@Design_Eng", TextBox2.Text))
cmd.Parameters.Add(New OdbcParameter("@CAE_Eng", TextBox3.Text))
cmd.Parameters.Add(New OdbcParameter("@Mkt", TextBox7.Text))
cmd.Parameters.Add(New OdbcParameter("@Accounting", TextBox4.Text))
cmd.Parameters.Add(New OdbcParameter("@It", TextBox8.Text))
cmd.Parameters.Add(New OdbcParameter("@Admin", TextBox5.Text))
cmd.Parameters.Add(New OdbcParameter("@Experience", TextBox1.Text))
cmd.Parameters.Add(New OdbcParameter("@Industry", TextBox6.Text))
cmd.Parameters.Add(New OdbcParameter("@Current_CTC", CurrentCTCtxt.Text))
cmd.Parameters.Add(New OdbcParameter("@InHand", Inhandtxt.Text))
cmd.Parameters.Add(New OdbcParameter("@ExpectedCTC", ExpectedCTCtxt.Text))
cmd.Parameters.Add(New OdbcParameter("@Exp_Inhand", Expectedinhand.Text))
cmd.Parameters.Add(New OdbcParameter("@Joining_Period", joiningtxt.Text))
cmd.Parameters.Add(New OdbcParameter("@Iziel_Result", iZielResultktxt.Text))
cmd.Parameters.Add(New OdbcParameter("@Iziel_Remark", IzielRemarktxt.Text))
cmd.Parameters.Add(New OdbcParameter("@Candidate_Remark", CandidateResulttxt.Text))

con.Open()
cmd.ExecuteNonQuery()
Mar 14 '11 #1
1 2854
code green
1,726 Expert 1GB
Table TableHR1 has more fields than the number of values you are passing
Mar 14 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: rked | last post by:
I get nameSPAN1 is undefined when I place cursor in comments box.. <%@ LANGUAGE="VBScript" %> <% DIM ipAddress ipAddress=Request.Servervariables("REMOTE_HOST") %> <html> <head> <meta...
7
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
4
by: pshindle | last post by:
DB2 Team - I just downloaded and unzipped the new Fixpack 9 for DB2 ESE V8 for Windows (FP9_WR21350_ESE.exe). I then burned the unzipped Fixpack files to a CD. I proceded to install this...
1
PEB
by: PEB | last post by:
POSTING GUIDELINES Please follow these guidelines when posting questions Post your question in a relevant forum Do NOT PM questions to individual experts - This is not fair on them and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.