Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NET3.0 C#3.0 SQL
cmd = new OleDbCommand("select * from payment where ID='"+pid+"'", con);
When i execute this code then i got some error "Data type mismatch in criteria expression"
 
where
id column is Autonumber
and
pid is String
 
so any one help me..
 
Regard
Sham
Smile | :)
Posted 25-Sep-12 19:10pm
Edited 25-Sep-12 19:12pm
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hello frnd i solve my self.....
cmd = new OleDbCommand("select * from payment where ID="+pid+"", con);
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 433
1 Sergey Alexandrovich Kryukov 187
2 PhilLenoir 120
3 Richard Deeming 120
4 RyanDev 115
0 Sergey Alexandrovich Kryukov 6,405
1 OriginalGriff 5,798
2 CPallini 2,473
3 Richard MacCutchan 1,647
4 Abhinav S 1,530


Advertise | Privacy | Mobile
Web03 | 2.8.140821.2 | Last Updated 27 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100