hi
Plz find the below code and its shows the error message as Missing Comma
'asp codes
[HTML]sqlinsert="INSERT INTO Tbl_RequestInfo (" &_
"ReqJobdesc, " &_
"ReqRemarks, " &_
"ReqServicetypeid, " &_
"ReqArea, " &_
"ReqCraft, " &_
"ReqGroup, " &_
"ReqRschedDate, " &_
"ReqScheduleddate, " &_
"ReqStatus, " &_
"ReqCalldate, " &_
"ReqUpdatedLastby, " &_
"ReqUpdatedLast, " &_
"ReqScheduledby) values (" &_
STR_Quote2(ReplaceQuote(textJobDesc)) & ", " &_
STR_Quote2(ReplaceQuote(textremarks)) & ", " &_
STR_Quote2(ReplaceQuote(textservicetype)) & ", " &_
STR_Quote2(ReplaceQuote(textservicearea)) & ", " &_
STR_Quote2(ReplaceQuote(textcraft)) & ", " &_
STR_Quote2(ReplaceQuote(textgroup)) & ", " &_
STR_Quote2(ReplaceQuote(textsched)) & ", " &_
"'" & curdate & "', " &_
STR_Quote2(ReplaceQuote(textstatus)) & ", " &_
"'" & curdate & "', " &_
STR_Quote2(ReplaceQuote(session("username"))) & ", " &_
"'" & curdate & "', " &_
STR_Quote2(ReplaceQuote(session("username"))) & ")[/HTML]
and its values shows as
[HTML]INSERT INTO Tbl_RequestInfo (ReqJobdesc, ReqRemarks, ReqServicetypeid, ReqArea, ReqCraft, ReqGroup, ReqRschedDate, ReqScheduleddate, ReqStatus, ReqCalldate, ReqUpdatedLastby, ReqUpdatedLast, ReqScheduledby) values ('testing', 'this is for testing purpose', '1', '6RD-6RA-6RB', 'EL', '1', '4/2/2008', 'To_Date('4/2/2008 9:25:10 AM','mm/dd/yyyy hh:mi:ss')', 'Blocked', 'To_Date('4/2/2008 9:25:10 AM','mm/dd/yyyy hh:mi:ss')', 'USER','TO_Date('4/2/2008 9:25:10 AM','mm/dd/yyyy hh:mi:ss')', 'USER'[/HTML]
any solution plz
2 1698
Hi jestin,
I can't see the error but you should be able to track it down. The first thing to do is to run the sql string that you've printed above in query analyzer (or similar) and see if it works. Does it error? If so can you see which line it errors on?
Also, there isn't a closing bracket at the end of your sql string - is this just a typo?
Dr B
I think its in the To_Date values. There's a possible confusion in 'To_Date('4/2/2008 9:25:10 AM','mm/dd/yyyy hh:mi:ss')'.
What DB are you using? I'm not sure if To_Date is a function of your DB server, but if it's the case then you may try to NOT enclose the To_Date value with single quotes.
like... -
sqlinsert="INSERT INTO Tbl_RequestInfo (" &_
-
"ReqJobdesc, " &_
-
"ReqRemarks, " &_
-
"ReqServicetypeid, " &_
-
"ReqArea, " &_
-
"ReqCraft, " &_
-
"ReqGroup, " &_
-
"ReqRschedDate, " &_
-
"ReqScheduleddate, " &_
-
"ReqStatus, " &_
-
"ReqCalldate, " &_
-
"ReqUpdatedLastby, " &_
-
"ReqUpdatedLast, " &_
-
"ReqScheduledby) values (" &_
-
STR_Quote2(ReplaceQuote(textJobDesc)) & ", " &_
-
STR_Quote2(ReplaceQuote(textremarks)) & ", " &_
-
STR_Quote2(ReplaceQuote(textservicetype)) & ", " &_
-
STR_Quote2(ReplaceQuote(textservicearea)) & ", " &_
-
STR_Quote2(ReplaceQuote(textcraft)) & ", " &_
-
STR_Quote2(ReplaceQuote(textgroup)) & ", " &_
-
STR_Quote2(ReplaceQuote(textsched)) & ", " &_
-
curdate & ", " &_
-
STR_Quote2(ReplaceQuote(textstatus)) & ", " &_
-
curdate & ", " &_
-
STR_Quote2(ReplaceQuote(session("username"))) & ", " &_
-
curdate & ", " &_
-
STR_Quote2(ReplaceQuote(session("username"))) & ")
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Alberto Vera |
last post by:
Hello:
I have the next structure:
How Can I make it using Python?
How Can I update the value of 6?
|
by: Arne |
last post by:
From: "Arne de Booij" <a_de_booij@hotmail.com>
Subject: Comma delimited array into DB problems
Date: 9. februar 2004 10:39
Hi,
I have an asp page that takes input from a form on the previous...
|
by: Duncan Smith |
last post by:
Hello,
I'm not very experienced in SQL and I need some advice. I have a
comma separarated values file containing around 20 million records and about
20 fields. There are many missing values...
|
by: Derek |
last post by:
I came upon the idea of writting a logging class that
uses a Python-ish syntax that's easy on the eyes (IMO):
int x = 1;
double y = 2.5;
std::string z = "result";
debug = "Results:", x, y,...
|
by: Annette Massie |
last post by:
I have a park permit tracking database where I was thinking of having
the user enter all the park permits individually, however realized
that in a day, a park could host many daily users. So if 100...
|
by: Shawn Odekirk |
last post by:
Some code I have inherited contains a macro like the following:
#define setState(state, newstate) \
(state >= newstate) ? \
(fprintf(stderr, "Illegal...
|
by: siliconwafer |
last post by:
Hi,
In case of following expression:
c = a && --b;
if a is 0,b is not evaluated and c directly becomes 0.
Does this mean that && operator is given a higher precedence over
'--'operator?
as...
|
by: Lighter |
last post by:
In 5.3.3.4 of the standard, the standard provides that "The lvalue-to-
rvalue(4.1), array-to-pointer(4.2),and function-to-pointer(4.3)
standard conversions are not applied to the operand of...
|
by: anupamadatta |
last post by:
Hi there,
I am trying to execute one Insert query using Pro C . the Insert query is as below:
Prepared statement is :
stmnt.len =
sprintf((char*)stmnt.arr,
"INSERT INTO %s ("...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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,...
| |