473,388 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

data type mismatch

I am receiving this following error message for this particular section of code. I am working on some ASP pages for an Access database. The only problem I can see is possibly that the FormID is listed as Autonumber in the Access database and I think the replace funtion is looking for a string variable. Any suggestions on what the problem may be? Line 57 is in bold.

Thanks!


Error Message:

Technical Information (for support personnel)

Error Type:
Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression.
/hawksnest/form22/approver.asp, line 57

%>
<%
Dim rsAccept__MM_ColParam
rsAccept__MM_ColParam = 1
If (Request.QueryString("FormID") <> "") Then
rsAccept__MM_ColParam = Request.QueryString("FormID")
End If
%>
<%
Dim rsAccept
Dim rsAccept_numRows

Set rsAccept = Server.CreateObject("ADODB.Recordset")
rsAccept.ActiveConnection = MM_mis_STRING
rsAccept.Source = "SELECT FormID,Submitteddate,InitiatoruserID,Isfname,Islna me,Isrank,Isemail,IsDSN,InitUID,InitLName,InitFNam e,InitEmail,InitDSN,InitRank,Savdollar,Savman,Init Def,InitRtmc,PubNo,BDate,CNo,CDate,WPack,PNo,ParNo ,Fig,Priority,Change,PubID,PubCategory FROM dbo_TForm22,dbo_TF22Control,dbo_TF22InitPOC,dbo_TF 22Defrtmc,dbo_TF22Pubs,dbo_TF22Routing,dbo_tzPubli cationCategory WHERE FormID = '" + Replace(rsAccept__MM_ColParam, "'", "''") + "'"
'AND TF22Control.FormIDfk = " + Replace(rsAccept__MM_ColParam, "'", "''") + " AND InitUID = InitiatoruserID AND TF22Defrtmc.FormIDfk = " + Replace(rsAccept__MM_ColParam, "'", "''") + " AND TF22Pubs.FormIDfk = " + Replace(rsAccept__MM_ColParam, "'", "''") + " AND TF22Routing.FormIDfk = " + Replace(rsAccept__MM_ColParam, "'", "''") + " AND PubID = PubNo"
rsAccept.CursorType = 0
rsAccept.CursorLocation = 2
rsAccept.LockType = 1
rsAccept.Open()

rsAccept_numRows = 0

Approver = request.QueryString("Approver")
%>
Sep 15 '06 #1
2 1997
Hi, did u ever get a solution to that problem. I am having the exact same problem and like you the only that seems off is that the column is an auto number and its querying as a string.

Let me know if you got a solution. Thanks
Aug 1 '07 #2
ilearneditonline
130 Expert 100+
Try replacing this line...

Expand|Select|Wrap|Line Numbers
  1. = '" + Replace(rsAccept__MM_ColParam, "'", "''") + "'"
With

Expand|Select|Wrap|Line Numbers
  1. = " + Replace(rsAccept__MM_ColParam, "'", "''")
There is nothing wrong with your Replace, but rather that it was placing what should have been a integer value into single quotes and making it a string. That will make your query fail every time.

Since you are using Dreamweaver, you will always want to make sure you don't get other similar `issues`.
Aug 1 '07 #3

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

Similar topics

1
by: LJgrnl | last post by:
I've got a type mismatch error that's driving me nutty. Variable blnNoData has the initial value False. If a recordset comes back empty (both .EOF and ..BOF are true) then blnNoData is set to...
1
by: deko | last post by:
Okay, so I figured out how to pull Outlook Appointments into an Access Table (see below). But the data comes in the wrong Data Type - how do I convert it from Text to Long Integer? For...
2
by: Chicken Kebab Abdullah | last post by:
Does anyone know why I get the error 3464 Data type mismatch from the following code. I have a form with a combo(to choose a consumable) and 2 list boxes on it. list on left is all printers...
0
by: news.paradise.net.nz | last post by:
I have been developing access databases for over 5 years. I have a large database and I have struck this problem with it before but can find nothing in help or online. Access 2000 I have a query...
1
by: ArcadeJr | last post by:
Good morning all! I have been getting a Run-time Error message #3464 - Data Type mismatch in criteria expression. While trying to run a query. I have a database where the field Asset_Number...
3
by: Jake | last post by:
I am currently trying to create my own Point Of Sale software for my retail store. I wrote the program with the UPC field as Long integer. When I started to add the products by UPC code, I got a...
1
by: amitbadgi | last post by:
I am getting the following error while converting an asp application to asp.net Exception Details: System.Runtime.InteropServices.COMException: Data type mismatch in criteria expression. ...
2
by: psychomad | last post by:
Please, can someone help me out to solve this error, i've been searching throughout my codes and yet i didnt succeed in finding the error!!!! The Error is: Server Error in '/' Application....
15
by: sara | last post by:
I have a Memo field in a table to hold notes from a conversation a social worker has had with a client (this is for a non-profit). If the user needs to update the memo field, I need to find the...
19
by: Lysander | last post by:
I have written a query that takes three integers representing day,month and year, forms a date from them and compares this date to the date the record was entered and returns any records where the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
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
0
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...
0
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
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,...
0
jinu1996
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...
0
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...

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.