If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Number of query values and destination fields are not the same.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-28-04, 12:45
vpdb vpdb is offline
Registered User
 
Join Date: Jun 2004
Posts: 9
Question Number of query values and destination fields are not the same.

hi...i keep getting this error...i KNOW why im getting, i just dont know any way around it...im using session variabes from a form and they are being inserted into an access db...the problem is that my database has one extra field which is my primary key "ID" (autonumber)...it works fine when i take it out, but then im left without a primary key...my statement looks like this...

sSQL = "INSERT into appTest_tbl values ('" & _
(Session.SessionID) & "','" & Session("lastname") & "','" & Session("firstname") & "','" & Session("midname") & "','" & Session("presentstreet") & "')"


because im adding 5 fields to a database which has 6 openings it gives me this error...any ideas? thanks for your time...
Reply With Quote
  #2 (permalink)  
Old 07-28-04, 21:22
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
try specifying your column values eg...

sSQL = "INSERT into appTest_tbl (col2, clo3, col4, col5, col6) values ('" & _
(Session.SessionID) & "','" & Session("lastname") & "','" & Session("firstname") & "','" & Session("midname") & "','" & Session("presentstreet") & "')"
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On