473,725 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

data type mismatch error

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.

Source Error:

Line 233:
Line 234: rs =
Server.CreateOb ject("ADODB.rec ordset")
Line 235: rs.open(" Select * From tblEvent WHERE
date_of_event = '" & currenttime & " ' ", conn, 1, 3)
Line 236: 'response.Write (sql1)
Line 237:
Source File: C:\Documents and Settings\amit\W ebSite1\calenda r.aspx
Line: 235

Stack Trace:

[COMException (0x80040e07): Data type mismatch in criteria expression.]

Microsoft.Visua lBasic.Compiler Services.LateBi nding.InternalL ateCall(Object
o, Type objType, String name, Object[] args, String[] paramnames,
Boolean[] CopyBack, Boolean IgnoreReturn) +776

Microsoft.Visua lBasic.Compiler Services.NewLat eBinding.LateCa ll(Object
Instance, Type Type, String MemberName, Object[] Arguments, String[]
ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
IgnoreReturn) +193987
ASP.calendar_as px.__Render__co ntrol1(HtmlText Writer __w, Control
parameterContai ner) in C:\Documents and
Settings\amit\W ebSite1\calenda r.aspx:235
System.Web.UI.C ontrol.RenderCh ildrenInternal( HtmlTextWriter writer,
ICollection children) +98
System.Web.UI.C ontrol.RenderCh ildren(HtmlText Writer writer) +20
System.Web.UI.P age.Render(Html TextWriter writer) +27
System.Web.UI.C ontrol.RenderCo ntrolInternal(H tmlTextWriter writer,
ControlAdapter adapter) +53
System.Web.UI.C ontrol.RenderCo ntrol(HtmlTextW riter writer,
ControlAdapter adapter) +280
System.Web.UI.C ontrol.RenderCo ntrol(HtmlTextW riter writer) +24
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint)
+8878

Nov 19 '05 #1
1 3279
My guess is that (a) either your date in an incorrect format, or (b) you
should place it between # instead of '
(http://support.microsoft.com/default.aspx/kb/175258)

It's good that you are going the ASP.Net route, but why use a RecordSet when
you could be using a DAtaReader?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
<am*******@gmai l.com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
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.

Source Error:

Line 233:
Line 234: rs =
Server.CreateOb ject("ADODB.rec ordset")
Line 235: rs.open(" Select * From tblEvent WHERE
date_of_event = '" & currenttime & " ' ", conn, 1, 3)
Line 236: 'response.Write (sql1)
Line 237:
Source File: C:\Documents and Settings\amit\W ebSite1\calenda r.aspx
Line: 235

Stack Trace:

[COMException (0x80040e07): Data type mismatch in criteria expression.]

Microsoft.Visua lBasic.Compiler Services.LateBi nding.InternalL ateCall(Object
o, Type objType, String name, Object[] args, String[] paramnames,
Boolean[] CopyBack, Boolean IgnoreReturn) +776

Microsoft.Visua lBasic.Compiler Services.NewLat eBinding.LateCa ll(Object
Instance, Type Type, String MemberName, Object[] Arguments, String[]
ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
IgnoreReturn) +193987
ASP.calendar_as px.__Render__co ntrol1(HtmlText Writer __w, Control
parameterContai ner) in C:\Documents and
Settings\amit\W ebSite1\calenda r.aspx:235
System.Web.UI.C ontrol.RenderCh ildrenInternal( HtmlTextWriter writer,
ICollection children) +98
System.Web.UI.C ontrol.RenderCh ildren(HtmlText Writer writer) +20
System.Web.UI.P age.Render(Html TextWriter writer) +27
System.Web.UI.C ontrol.RenderCo ntrolInternal(H tmlTextWriter writer,
ControlAdapter adapter) +53
System.Web.UI.C ontrol.RenderCo ntrol(HtmlTextW riter writer,
ControlAdapter adapter) +280
System.Web.UI.C ontrol.RenderCo ntrol(HtmlTextW riter writer) +24
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint)
+8878

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2491
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 True. I then have an if statement to determine what to write to the screen depending on blnNoData. As long as the if statement is true (doesn't have to go to the else clause), the code runs fine. Otherwise, a type mismatch error is returned. In...
1
4957
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 example, If I have a custom Form in Outlook with and "Entity_ID" field, this number will come into the table as text - and every time I try to do something with it, I get "data type mismatch".
2
10818
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 and list on right shows the ones currently compatible with the consumable chosen in the combo at the top.
0
2252
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 that will run fine without any criteria but as soon as I add any criteria it gives a "Data type mismatch" error. As soon as I remove any criteria it runs perfectly. I know this query is based on another query but I have other processes based on...
1
6544
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 was once a type Number, but I had to change it to a type Text due to I needed to have two zeros at the beginning of the Asset Number (EX: 001234.) The rease I am writing is that now when I run from My Query Menu a
3
5612
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 data mismatch error. I realized UPC codes are 12 digits, sometimes more and sometimes less. This falls out of the Long integer field type. I then changed my type on all UPC fields in all of the tables containing this field to a text data type. ...
2
9000
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. -------------------------------------------------------------------------------- Data type mismatch in criteria expression.
15
7371
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 original record (which I am doing fine - getting the correct key) and I need to update the "notes" with the new value from the form, which I store in a String Variable. (I've tried storing in a Variant variable; didn't work for me)
19
21566
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 date is more than 10 months out. The query runs fine, but I when I put the criteria of >10 I get 'Data Type mismatch' error. The code below is the original query. I have since put all the datediff bit in code, with all variables declared as date,...
0
8752
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
9401
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...
0
9257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9111
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6702
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
6011
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4517
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...
1
3221
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 we have to send another system
2
2634
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.