473,664 Members | 3,028 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_editConnecti on = MM_CFSLOG_STRIN G
MM_editTable = "TBL_InbondCove rSheet"
MM_editRedirect Url = "default.as p"
MM_fieldsStr = "IT|value|Statu s|value|EntryDa te|value|BLMAWB |value|ETA|valu e|ArrivalDate|v alue|SSRelease| value|OrgCheck| value|Importer| value|FaxCheck| value|SignedPOD |value|Filed|va lue|Broker|valu e|ImportService Fee|value|Consi gnee|value|Hand ingCharge|value |Qty|value|CFSC ODCOLLECT|value |Weight|value|S torBegins|value |CFSDelivery|va lue|DaysInStore |value|CODPayTo |value|StorEnds |value|StorageS etToEnd|value|C odAmount|value| StoreRate|value |StorageFee|val ue|TotalDue|val ue|podpro|value |stgjob|value|s sajob|value|nvj ob|value|STGLOA D|value|misc|va lue|WebComments |value|Internal Comments|value"
MM_columnsStr = "ITNumber|',non e,''|Status|',n one,''|EntryDat e|#,none,NULL|B LMAWBNumber|',n one,''|ETA|',no ne,''|ArrivalDa te|',none,''|SS Rel|none,1,0|Or gChk|none,1,0|I mporter|',none, ''|FaxChk|none, 1,0|SignedPOD|n one,1,0|Filed|n one,1,0|Broker| ',none,''|ImpSe rFee|none,none, NULL|Consignee| ',none,''|HandC hg|none,none,NU LL|Pieces|none, none,NULL|CFSCo llectCOD|',none ,''|Weight|',no ne,''|StorBegin s|',none,''|CFS Delivery|none,1 ,0|DaysInStor|' ,none,''|CODPay To|',none,''|St orEnds|',none,' '|SetStorEnds|n one,1,0|CODAmnt |none,none,NULL |StoreRate|none ,none,NULL|Tota lStorFee|none,n one,NULL|TotalD ue|none,none,NU LL|POD_PRO|',no ne,''|STGJOB|', none,''|SSALOAD |',none,''|NVJo b|',none,''|STG Load|',none,''| Load_MISC|',non e,''|WebComment s|',none,''|Int ernalComments|' ,none,''"

' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fields Str, "|")
MM_columns = Split(MM_column sStr, "|")

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

' append the query string to the redirect URL
If (MM_editRedirec tUrl <> "" And Request.QuerySt ring <> "") Then
If (InStr(1, MM_editRedirect Url, "?", vbTextCompare) = 0 And Request.QuerySt ring <> "") Then
MM_editRedirect Url = MM_editRedirect Url & "?" & Request.QuerySt ring
Else
MM_editRedirect Url = MM_editRedirect Url & "&" & Request.QuerySt ring
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 2908
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
1681
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 ((Year(event_date) = #2004# and event_is_reserved = '0') or event_is_reserved = '1' ) produces this error: Microsoft JET Database Engine error '80040e07'
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" for when and how to use single quotes and double quotes in ASP? thanks! ---------------------- SQL = SQL & "WHERE '" & REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE("GenKTitles.
2
6163
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") & "/" & Request.Form("StartDateYear") EndDate = Request.Form("EndDateMonth") & "/" & Request.Form ("EndDateDay") & "/" & Request.Form("EndDateYear")
2
1673
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 noon in an access query? Thanks Regards
1
3237
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 converted my dates in serial increments of 6 hours intervals. I verified that these serial dates have the expected values. I run into repeated syntax error in the adapted Query.
4
1882
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 MESSAGE) sql_HTTermijnRecords = "select * from Orders where FaktuurGeprint = 'J'" & _ "AND dathergestuurd Is Not Null " & _ "AND PerBankKas Is Null " & _
7
6877
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 expression should return the 4 leftmost characters of the FilmNo
3
4925
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 * from copyorderdtl where(((cr_created_date)is Null) and ((cr_statusupdt_date)=)) OR (((cr_created_date) is not null and (cr_statusupdt_Date)=));
7
2841
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 the latest patches. If I do not group the query (ie. remove aggregation) it will work. If I recall, it also works if my subquery does not have joins. I want to accomplish this with pure SQL .. I could easily write a VBA function to handle...
0
8437
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8348
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8861
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8549
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7375
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6187
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4185
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4351
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1759
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.