Current location: Hot Scripts Forums » Programming Languages » ASP » Type mismatch error querying autonumber field in Access.


Type mismatch error querying autonumber field in Access.

Reply
  #1 (permalink)  
Old 03-02-06, 04:40 PM
bazango bazango is offline
Newbie Coder
 
Join Date: Feb 2006
Location: Iowantoutahere
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Type mismatch error querying autonumber field in Access.

Using

<%
SqlJunk = "SELECT * FROM study1 WHERE ID = '"&i&"'"
%>

I get a "type mismatch" error. If I change ID to a text field in Access, it works just fine, but I really need it to be autonumber. Sorry to ask another ignorant question. Help?
Reply With Quote
  #2 (permalink)  
Old 03-03-06, 11:45 AM
koncept
Guest
 
Posts: n/a
for numbers you do not need single quotes the following query should work just fine

"select * from study1 where id = " & i
Reply With Quote
  #3 (permalink)  
Old 03-03-06, 04:14 PM
bazango bazango is offline
Newbie Coder
 
Join Date: Feb 2006
Location: Iowantoutahere
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
You'd think I'd of tried that, wouldn't you? Works perfectly! Thank you so much! A mazillion.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable form fields to be submitted RickyRod JavaScript 2 05-24-04 10:15 AM
Data type mismatch in criteria expression jorge ASP 1 05-02-04 06:18 PM
type mismatch and update loop - HELP! seala ASP 1 09-22-03 05:27 PM
type mismatch: 'orderTotal' triaz ASP 4 09-03-03 01:58 PM
Query Dump for blob field type ridwank PHP 4 06-20-03 11:35 AM


All times are GMT -5. The time now is 03:42 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.