AllExperts > Experts 
Search      

Active Server Pages Programming (ASP)

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More Active Server Pages Programming (ASP) Answers
Question Library

Ask a question about Active Server Pages Programming (ASP)
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Jeff Allen
Expertise
I can answer basic to intermediate questions related to Classic ASP.I can answer Intermediate to Advanced questions CSS& HTML, and basic questions about JavaScript and Ajax. I can also answer questions related to web page accessibility under US Section 508.

Experience
I have 8 years experience with HTML. I have been developing in ASP, VBScript and CSS for two years each. I also currently work as web developer.

Organizations
IWA-HWG

Education/Credentials
I have a BA in English with minors in Web Design and Scientific and Technical Writing

 
   

You are here:  Experts > Computing/Technology > Business Software > Active Server Pages Programming (ASP) > data type mismatch

Topic: Active Server Pages Programming (ASP)



Expert: Jeff Allen
Date: 9/15/2006
Subject: data type mismatch

Question
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.


[B]Error Message:[/B]

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,Islname,Isrank,Isemail,IsDSN,InitUID,InitLName,InitFName,InitEmail,InitDSN,InitRank,Savdollar,Savman,InitDef,InitRtmc,PubNo,BDate,CNo,CDate,WPack,PNo,ParNo,Fig,Priority,Change,PubID,PubCategory FROM dbo_TForm22,dbo_TF22Control,dbo_TF22InitPOC,dbo_TF22Defrtmc,dbo_TF22Pubs,dbo_TF22Routing,dbo_tzPublicationCategory 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
[B]rsAccept.Open()[/B]

rsAccept_numRows = 0

Approver = request.QueryString("Approver")
%>

Answer
Actually I thinkit might be something else have you checked your SQL string against the database to make sure it correct?

It looks like one of the fields you are posting to doesn't support what you are sending to it.

Also, which line is line 57?

View Follow-Ups    Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.