473,396 Members | 1,785 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,396 software developers and data experts.

Microsoft JET Database Engine error

1
Hello,

I am getting the following error on my code:

Microsoft JET Database Engine error '80040e07'
Data type mismatch in criteria expression.

Personeelsnummer.Asp, line 220

The code.

Expand|Select|Wrap|Line Numbers
  1.     <%
  2.         Set oRs=Server.CreateObject("adodb.recordset")
  3.         Pn=Request("ZoekPersNr")
  4.         strSQL = "SELECT P_Tussenvoegsel, P_Achternaam FROM tbl_peroonsgegevens_zld WHERE PersNr= '" & Pn & "'"
  5.         oRs.Open strSQL, MyConn
  6.         if NOT oRs ("P_Achternaam") = " " then
  7.               Response.Write "<tr><td><font size=""2"" face=""Verdana""><b>Partnernaam</font></b></td><td height=""20""><font size=""2"">"&  oRs ("P_Tussenvoegsel")& " "&  oRs ("P_Achternaam") &"</font></td> </tr>"
  8.         end if
  9.     %>    

Its a MSaccess 2003 database and frontpage 2003 website.

Line 220 is
Expand|Select|Wrap|Line Numbers
  1. oRs.Open strSQL, MyConn
Many Thanks.
May 29 '12 #1
1 1919
MikeTheBike
639 Expert 512MB
Hi

I'm just guessing but I suspect that PersNr is a numeric field; if so then change you sql to
Expand|Select|Wrap|Line Numbers
  1. strSQL = "SELECT P_Tussenvoegsel, P_Achternaam FROM tbl_peroonsgegevens_zld WHERE PersNr= " & Pn 
  2.  
ie. remove th apostrophies, there are only require for text fields.

HTH


MTB
May 29 '12 #2

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

Similar topics

2
by: Alex Vidal | last post by:
Hi, I have windows 2000 server with IIS and I program ASP. I use the string: "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=basedatos.mdb;" to data base Access and it always works ok. But I...
0
by: Ash | last post by:
Hi All, I get the following error on a application which was running well for 4 years. The error happens few times a day. ----------------------------------------------- Microsoft JET Database...
2
by: Abubakar | last post by:
Hello , I just finished developing a program using Microsoft Desktop Engine with C# as the front end. Everything is okay on my system. But, on trying to deploy it on a different system it gives an...
2
by: bananna77 | last post by:
In Access'97, I am currently trying to run a Select query, which I normally run every week, without problem, until now. I am currently getting the following error message; The Microsoft Jet...
1
by: Ely | last post by:
Hi I create an expression in a Macro Argument and adding a Where Condition that matches the control name of the form with the report. It was working fin, but I made a change in the report that...
0
by: ssrirao | last post by:
When I try to Export data from a table into a locally residing Microsoft Excel, using DTS Import/Export Wizard. I get the following error Message Error Source: Microsoft JET Database Engine...
1
by: pawar karuna | last post by:
Hi all, I have designed a database in which there are lot of reltaionships. Sometime i get error stating "jet database engine error" can you please help to solve this problem.
0
japuentem
by: japuentem | last post by:
Hi all I am trying to create an axcel connection using the DTS excel connection but when I try to assign the excel document to the Excel Connection object, it return the following error: Error...
1
by: Concheso | last post by:
Hi there! I just created a login page. 1/3 of the login works fine, but some like "Lost Password" of "Admin access to add users" are not working. Any help will be great! The erros: On...
2
by: phuc2583 | last post by:
I have a problem with an application I developed with code charge. Whenever I try to access a table in a database I get the following error: Microsoft JET Database Engine error '80040e09' Cannot...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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...
0
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...

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.