ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 23rd, 2004, 12:12 PM
shrry8 shrry8 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 32 shrry8 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 43 m 37 sec
Reputation Power: 16
what is that problem

Hi,

can anyone help me, i m getting this error in two regdownload.asp and regnews.asp files.... i dont know what is going on


Error Type:
Microsoft JET Database Engine (0x80004005)
Number of query values and destination fields are not the same.
/firstequity/regnews.asp, line 9

plz doo help me out
Attached Files
File Type: zip files.zip (14.7 KB, 570 views)

Reply With Quote
  #2  
Old June 23rd, 2004, 08:15 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
INSERT statements look like this:
Code:
INSERT INTO tableName (fieldNames, ...) VALUES (fieldValues, ...)
You are missing the fieldNames portion.

Reply With Quote
  #3  
Old June 23rd, 2004, 08:51 PM
shrry8 shrry8 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 32 shrry8 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 43 m 37 sec
Reputation Power: 16
Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error in INSERT INTO statement.
/firstequity/regnews.asp, line 8


now i am getting this error if i write this below query with a response.write then it shows me that data is going on but when i use Conn.Execute then it shows me


Response.Write "Insert into News1 values('" & s & "', '" & n & "', '#" & Date & "#')"

Error Type:
Microsoft JET Database Engine (0x80004005)
Number of query values and destination fields are not the same.
/firstequity/regnews.asp, line 9


i have also attached the files with my first post. u can even check it out.

Reply With Quote
  #4  
Old June 23rd, 2004, 08:53 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
Re-read my post carefully. Or go and read how to correct write an insert statement - there are tutorials all over the net.

Reply With Quote
  #5  
Old June 23rd, 2004, 09:06 PM
shrry8 shrry8 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 32 shrry8 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 43 m 37 sec
Reputation Power: 16
Can u tell me which one is correct


Conn.Execute "Insert into News1(s,n,Dt) values ('" & s & "', '" & n & "', '#" & Date & "#')"

or like this

Conn.Execute "Insert into News1(subject,news,Dt) values ('" & s & "', '" & n & "', '#" & Date & "#')"

Reply With Quote
  #6  
Old June 23rd, 2004, 09:11 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
the fieldName list comprises of your field names from your database table. So, if your field name is subject, then write subject... e.g.
Code:
insert into news (subject) VALUES ('" & varSubject & "')

Reply With Quote
  #7  
Old June 23rd, 2004, 09:18 PM
shrry8 shrry8 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 32 shrry8 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 43 m 37 sec
Reputation Power: 16
Conn.Execute "Insert into News1(subject,news,Date) values ('" & subject & "', '" & news & "', '#" & Date & "#')"

its is showing me

Microsoft VBScript runtime (0x800A01F5)
Illegal assignment: 'Date'
/firstequity/regnews.asp, line 6

Reply With Quote
  #8  
Old June 23rd, 2004, 09:21 PM
shrry8 shrry8 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 32 shrry8 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 43 m 37 sec
Reputation Power: 16
i m using this hole code

<!--#include file="conn.asp" -->
<%
Dim ut, s, n
subject = Request.Form("subject")
news = Request.Form("news")
Date = Request.Form("Dt")

Conn.Execute "Insert into News1(subject,news,Date) values ('" & subject & "', '" & news & "', '#" & Date & "#')"
'Conn.Execute "Insert into News1 values('" & s & "', '" & n & "', '#" & Date & "#')"
'Response.Write "Insert into News1 values('" & s & "', '" & n & "', '#" & Date & "#')"
%>

Reply With Quote
  #9  
Old June 23rd, 2004, 09:27 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
Date is a function (i.e. Date()) - instead, call your variables something like varDate, or dDate.

Reply With Quote
  #10  
Old June 23rd, 2004, 09:36 PM
shrry8 shrry8 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 32 shrry8 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 43 m 37 sec
Reputation Power: 16
Insert into News1(subject,news,NDate) values ('" & subject & "', '" & news & "', '#" & dDate & "#')

with this query date is not comming

Reply With Quote
  #11  
Old June 23rd, 2004, 09:50 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
Are you getting an error? Also, response.write your variables (subject, news, nDate) before inserting them into the query to ensure they contain data.

Reply With Quote
  #12  
Old June 23rd, 2004, 09:57 PM
shrry8 shrry8 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 32 shrry8 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 43 m 37 sec
Reputation Power: 16
Thanks its done now
Thanks again

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > what is that problem


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap