473,508 Members | 2,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Syntax error in date in query expression '#12122008#'.

1 New Member
Need Help ASAP!

History: Installed new SBS 2003 server on Monday. Migrated IIS, website and current Access database over to new server. I did not develop the website or Access database. Former IT guy is no where to be found. Everything is working on the new server except for one .asp page in the website that ties to the Access database. When I try and input data on the page and save it I receive the follwoing error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in date in query expression '#12122008#'.

/it/edit/itnew.asp, line 91


I by no means know anything about Access, but it seems like there is a problem with the "EntryDate" format. I have tried everything I can think of. I have been looking at this for three days with no success. This page works fine on the old server.

Here is my SQL code:
<%
' *** Insert Record: set variables

If (CStr(Request("MM_insert")) <> "") Then

MM_editConnection = MM_CFSLOG_STRING
MM_editTable = "TBL_InbondCoverSheet"
MM_editRedirectUrl = "default.asp"
MM_fieldsStr = "IT|value|Status|value|EntryDate|value|BLMAWB|valu e|ETA|value|ArrivalDate|value|SSRelease|value|OrgC heck|value|Importer|value|FaxCheck|value|SignedPOD |value|Filed|value|Broker|value|ImportServiceFee|v alue|Consignee|value|HandingCharge|value|Qty|value |CFSCODCOLLECT|value|Weight|value|StorBegins|value |CFSDelivery|value|DaysInStore|value|CODPayTo|valu e|StorEnds|value|StorageSetToEnd|value|CodAmount|v alue|StoreRate|value|StorageFee|value|TotalDue|val ue|podpro|value|stgjob|value|ssajob|value|nvjob|va lue|STGLOAD|value|misc|value|WebComments|value|Int ernalComments|value"
MM_columnsStr = "ITNumber|',none,''|Status|',none,''|EntryDate|#,n one,NULL|BLMAWBNumber|',none,''|ETA|',none,''|Arri valDate|',none,''|SSRel|none,1,0|OrgChk|none,1,0|I mporter|',none,''|FaxChk|none,1,0|SignedPOD|none,1 ,0|Filed|none,1,0|Broker|',none,''|ImpSerFee|none, none,NULL|Consignee|',none,''|HandChg|none,none,NU LL|Pieces|none,none,NULL|CFSCollectCOD|',none,''|W eight|',none,''|StorBegins|',none,''|CFSDelivery|n one,1,0|DaysInStor|',none,''|CODPayTo|',none,''|St orEnds|',none,''|SetStorEnds|none,1,0|CODAmnt|none ,none,NULL|StoreRate|none,none,NULL|TotalStorFee|n one,none,NULL|TotalDue|none,none,NULL|POD_PRO|',no ne,''|STGJOB|',none,''|SSALOAD|',none,''|NVJob|',n one,''|STGLoad|',none,''|Load_MISC|',none,''|WebCo mments|',none,''|InternalComments|',none,''"

' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")

' set the form values
For i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(i+1) = CStr(Request.Form(MM_fields(i)))
Next

' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If

End If
%>

I have also attached a screenshot of the Access Table that is in question.


Can someone please help me...I need to have this fixed by Monday morning.

thanks,

Shawn
Attached Images
File Type: jpg Access.jpg (12.2 KB, 387 views)
Dec 14 '08 #1
3 2898
MMcCarthy
14,534 Recognized Expert Moderator MVP
Not sure about the asp code but Access can't read a date in this format
'#12122008#'

the date has to be read as #12/12/2008#.
Dec 15 '08 #2
MMcCarthy
14,534 Recognized Expert Moderator MVP
I've spoken with one of our ASP experts and I am moving this post to the ASP forum. Hopefully they will be able to help you out.
Dec 15 '08 #3
JamieHowarth0
533 Recognized Expert Contributor
Hi there,

I'm the ASP expert in question. It looks like a case of GIGO (garbage in, garbage out) as your code seems fairly sound (albeit it's the first time I've ever seen it written in such a way!).

Can you please post two things to help me hone in on the problem:
1) Sample data which DEFINITELY breaks this page;
2) The HTML source of the form that posts to this page - basically, what page is before this one when going through the website? Get the source (particularly everything between the <form> and </form> tags, and any Javascript that might be relevant) and attach it to your next post back here.

Hope this helps.

codegecko
Dec 15 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
1678
by: Phil Powell | last post by:
select event_date, event_name, event_text, event_is_public, event_is_reserved, event_img_path, event_img_alt, event_member_id, event_is_email_notify from event where show_entry = '1' and...
29
2477
by: shank | last post by:
1) I'm getting this error: Syntax error (missing operator) in query expression on the below statement. Can I get some advice. 2) I searched ASPFAQ and came up blank. Where can find the "rules"...
2
6156
by: Aloof | last post by:
Using Access 2000 Windows Server 2003 The following code worked fine until we moved hosting companies StartDate = Request.Form("StartDateMonth") & "/" & Request.Form ("StartDateDay") & "/" &...
2
1662
by: John | last post by:
Hi I am using the this time syntax in an acess query; iif(>=#12:00:00 PM#,"PM","AM"). Problem is that I am getting error on the date expression. What is the correct expression to represent 12...
1
3218
by: u473 | last post by:
I am scratching my head with the required quotes and parentheses. I started with an existing working Query with Running Total by date. Now I need to produce a running total by quarter day, so I...
4
1875
by: T. Wintershoven | last post by:
Hi Can someone please tell me whats wrong with the last line of the query below. The first three lines work fine but when i add the fourth line i get an error message (see text at ERROR...
7
6863
by: John Øllgård Jensen | last post by:
Hi Using MS Asccess 2000: In a query I'm trying to create a new field with following expression: FilmDate: Left(,4) The field "FilmNo" is another text field in the query. This is...
3
4920
by: access baby | last post by:
I hava a date parameter filter query but it shows error Syntax error missing operator in query experssion can some one please help where am i going wrong in expression SELECT copyorderdtl * ...
7
2831
by: Yesurbius | last post by:
I am receiving the following error when attempting to run my query. In my mind - this error should not be happening - its a straight-forward query with a subquery. I am using Access 2003 with all...
0
7229
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7333
Oralloy
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,...
1
7061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7502
tracyyun
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...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1566
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.