473,512 Members | 15,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data Type Mismatch

3 New Member
Hi friend
Please tell me why this error is occured in following code

error=ERROR [22018] [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.




Expand|Select|Wrap|Line Numbers
  1. cmd = New OdbcCommand("INSERT INTO TableHR1 (No,name_of_candidate,Address,Date_of_birth,PhoneN o,Email, _
  2. Design_Eng,CAE_Eng,Mkt,Accounting,It,Admin ,Experience,Industry,Current_CTC,InHand,ExpectedCT C, _
  3. Exp_Inhand,Joining_Period,Iziel_Result,Iziel_Rem ark,Candidate_Remark) " _
  4. & " VALUES ( '" + notxt.Text + "', '" + nametxt.Text + " ','" + Addresstxt.Text + _
  5. " ',' " + DateOfBirthtxt.Text + "','" + Phonetxt.Text + "',' " _
  6.  + Emailtxt.Text + " ','" + TextBox2.Text + "','" + TextBox3.Text _
  7. + "',' " + TextBox7.Text + "','" + TextBox4.Text + "','" + TextBox8.Text _
  8.  + "','" + TextBox5.Text + "',' " + TextBox1.Text + "','" + TextBox6.Text _
  9. + "','" + CurrentCTCtxt.Text + "' ,'" + Inhandtxt.Text + "', '" + ExpectedCTCtxt.Text _
  10. + " ', '" + Expectedinhand.Text + "' ,' " + joiningtxt.Text + " ', '" _
  11. + iZielResultktxt.Text + " ','" + IzielRemarktxt.Text + "','" + CandidateResulttxt.Text + "')", con) 
Mar 12 '11 #1
1 1735
Stewart Ross
2,545 Recognized Expert Moderator Specialist
You are treating every field as being text - each VALUE in your insert statement is being enclosed in single quotes. One or more of these fields is not of type text in the underlying table. You will need to find out which yourself, as you give no clues to us in your question other than in names of fields such as date_of_birth, which would not normally be a text field.

-Stewart
Mar 12 '11 #2

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

Similar topics

0
2528
by: giancaMI | last post by:
Salve a tutti, la mia configurazione è la seguente: win 2k sp4 dreamweaver MX 2004 MySql ver. 4.1 su pc locale IIS Microsoft installato dunque, dopo avere installato MySql (che funziona...
2
3329
by: Denis Crespe | last post by:
Hello, I use the java.util.zip package and I try to zip a few files which have filenames with letters like "é" or "à". the Zip process goes well but I lose the original filename into the zip...
1
3281
by: Andrea Canegrati | last post by:
Ciao a tutti, devo eseguire una INSERT su un db in remoto...visto che non lo uso frequentemente utilizzo la funzione OPENDATASOURCE invece di linkare il server. Tutto funziona alla perfezione..ma...
1
2159
by: leo | last post by:
all'improvviso quando utilizzo istruzioni tipo: server.mappath("..\db") o nell'include uso il percorso scritto '..\file.inc' ho il seguente errore: Tipo di errore: Server.MapPath(), ASP...
0
1078
by: Giuseppe Esposito | last post by:
"The state information is invalid for this page and might be corrupted" Non è che non abbia già cercato... ma è che tutto quello che è venuto fuori dalla ricerca non è stato utile. Succede...
0
3484
by: and251076 | last post by:
Buongiorno, da pochi giorno ho installato la versione 2005 di Visual Studio, ma ahi mè non funziona tutto perfettamente. Infatti non riesco ad eseguite le miei applicazioni web in localhost. Se...
1
2044
by: dtefran3 | last post by:
The problem Implement a SortedList class which stores a list of int data in ascending order. Program requirements The public interface of your class is as follows: class SortedList{ public:...
1
2495
by: Abdulla Herzallah | last post by:
Hi everyone I don't know if I am posting this to the right newsgroup but it is the closest I found, in case you think you can advice me to another newsgroup please feel free to do so. I am so...
3
3296
by: Abdulla Herzallah | last post by:
Hi everyone I don't know if I am posting this to the right newsgroup but it is the closest I found, in case you think you can advice me to another newsgroup please feel free to do so. I am so...
5
2524
by: alivip | last post by:
How can I get every Token (word) and PreviousToken(Previous word) From multube files and frequency of each two word my code is trying to get all single word and double word (every Token (word) and...
0
7252
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
7432
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...
1
7093
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
5676
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,...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1583
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.