473,486 Members | 2,181 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

get the sql statement

How can I get the actual SQL statement rather than this sh@thole error?

Data type mismatch in criteria expression.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Data type mismatch in
criteria expression.

Source Error:

Line 265: Protected Sub btnSave_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
Line 266: saveImages()
Line 267: FormView1.InsertItem(True)
Line 268: End Sub
Line 269: Protected Sub btnPanel1Cancel_Click(ByVal sender As Object,
ByVal e As System.EventArgs)
Oct 2 '06 #1
5 1795
It's hard to tell, with the little information you provided....
The main thing is that, since it's a datatype mismatch - just look at the
data for each field, then check the Database table to see if the datatypes
match - I'm willing to bet you're trying to enter information that the table
wasn't made to have entered.

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com
"Afton Wynona" <bi*****@biteme.netwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
How can I get the actual SQL statement rather than this sh@thole error?

Data type mismatch in criteria expression.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Data type mismatch in
criteria expression.

Source Error:

Line 265: Protected Sub btnSave_Click(ByVal sender As Object, ByVal e
As
System.EventArgs)
Line 266: saveImages()
Line 267: FormView1.InsertItem(True)
Line 268: End Sub
Line 269: Protected Sub btnPanel1Cancel_Click(ByVal sender As Object,
ByVal e As System.EventArgs)


Oct 2 '06 #2
Try the SQLException

Link -
-
http://msdn.microsoft.com/library/de...mbersTopic.asp

--
Ameet Phadnis
Sr. Technical Consultant
e Tek Global Inc.
"Afton Wynona" wrote:
How can I get the actual SQL statement rather than this sh@thole error?

Data type mismatch in criteria expression.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Data type mismatch in
criteria expression.

Source Error:

Line 265: Protected Sub btnSave_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
Line 266: saveImages()
Line 267: FormView1.InsertItem(True)
Line 268: End Sub
Line 269: Protected Sub btnPanel1Cancel_Click(ByVal sender As Object,
ByVal e As System.EventArgs)
Oct 2 '06 #3
well no kidding.
How about the question that I asked. Do you have any information on that?


Oct 2 '06 #4
You might want to try a different approach. If you're going to be like that
to someone who is taking their valuable time to answer you, why should they
bother.

Chances are, you can't get the SQL since it's not the framework that's
throwing the error, it's the database itself, which has no need to make the
SQL statement available. If you're connecting to a database that has a
profiler tool, such as the SQL Server Profiler for SQL Server, you can
capture the entire communication and the actual query that's sent to the db.
You can then run this query directly against the db and see what it responds
then. Usually in these cases the database isn't going to give you any answer
as to what's going on and you just have to figure out which datatype is
incorrect on your own. If it's a stored procedure I often iterate through
all the parameters and their values so I have a list of what's getting
passed and compare it to the stored procedure parameter list. Usually I'm
off because I've jumped an element in the parameter array.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"Afton Wynona" <bi*****@biteme.netwrote in message
news:ua**************@TK2MSFTNGP02.phx.gbl...
well no kidding.
How about the question that I asked. Do you have any information on that?


Oct 2 '06 #5
yes, that does help.

I ought to be able to get from ASPX the statement that ASPX is sending to
the database, even though I might not be able to get the statement from the
database.
(I used to be able to do it with ASP).

Next, as far as being rude, believe me I am doing the world a favor by
discouranging people from posting ill-thought out, irrelevant answers that
are nothing but time wasters.
Oct 2 '06 #6

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

Similar topics

28
3537
by: Fábio Mendes | last post by:
I'm sorry if it's an replicate. Either my e-mail program is messing with things or the python-list sent my msg to /dev/null. I couldn't find anything related in previous PEP's, so here it goes a...
15
2777
by: Nerox | last post by:
Hi, If i write: #include <stdio.h> int foo(int); int main(void){ int a = 3; foo(a); }
13
2518
by: eman1000 | last post by:
I was recently looking at the prototype library (http://prototype.conio.net/) and I noticed the author used the following syntax: Object.extend(MyObj.prototype, { my_meth1: function(){},...
37
3242
by: Steven Bethard | last post by:
The PEP below should be mostly self explanatory. I'll try to keep the most updated versions available at: http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt...
18
2680
by: Steven Bethard | last post by:
I've updated the PEP based on a number of comments on comp.lang.python. The most updated versions are still at: http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt...
28
2904
by: Steven Bethard | last post by:
Ok, I finally have a PEP number. Here's the most updated version of the "make" statement PEP. I'll be posting it shortly to python-dev. Thanks again for the previous discussion and suggestions!...
7
2672
by: Steven Bethard | last post by:
I've updated PEP 359 with a bunch of the recent suggestions. The patch is available at: http://bugs.python.org/1472459 and I've pasted the full text below. I've tried to be more explicit about...
19
8338
by: Steve | last post by:
ASP error number 13 - Type mismatch with SELECT...FOR UPDATE statement I got ASP error number 13 when I use the SELECT...FOR UPDATE statement as below. However, if I use SELECT statement without...
18
7924
by: dspfun | last post by:
Hi! The words "expression" and "statement" are often used in C99 and C- textbooks, however, I am not sure of the clear defintion of these words with respect to C. Can somebody provide a sharp...
23
2040
by: florian.loitsch | last post by:
According to the spec Section 14 the production SourceElements:SourceElements SourceElement is evaluated as follows: 1. Evaluate SourceElements. 2. If Result(1) is an abrupt completion, return...
0
7105
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
6967
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...
1
6846
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
5439
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,...
1
4870
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...
0
4564
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...
0
3076
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...
0
1381
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 ...
1
600
muto222
php
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.