472,337 Members | 1,207 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

bamboozled by error message

I am repeatedly getting the error message 'error converting datatype
varchar to bit'. I am passing a varchar variable to a stored procedure
(where it is also a varchar) and then trying to write it to a table
(where it is also a varchar). I have no idea why it is trying to
convert it to a bit, it is very puzzling. Has anybody else had an error
like this?

*** Sent via Developersdex http://www.developersdex.com ***
Mar 5 '07 #1
3 2419
Mike P wrote:
I am repeatedly getting the error message 'error converting datatype
varchar to bit'. I am passing a varchar variable to a stored procedure
(where it is also a varchar) and then trying to write it to a table
(where it is also a varchar). I have no idea why it is trying to
convert it to a bit, it is very puzzling. Has anybody else had an
error like this?
Yes, I have encountered this error, and every single time it was caused
by a mistake I made when writing either the stored procedure itself, or
my ADO code to execute the procedure. Every time.

Can you successfully run the procedure from Query Analyzer?

If so, then it's a problem with your ADO code, which you should post
along with the "CREATE PROCEDURE ... AS" section of your procedure
creation script (we don't need to see the entire script in this case).
See here for my recommended method for executing procedures via ASP/ADO:
http://groups.google.com/group/micro...09dc1701?hl=en

If not, it is a problem with the stored procedure itself, whose script
you should post. If you can whittle everything out of the precedure
except the part that raises the error, that would be helpful, not only
for us but you as well: going through that exercise might help you spot
the problem yourself.. We need to see the table creation DDL as well -
relevant portion only please.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Mar 5 '07 #2
Thanks Bob...I will try to get something posted on here tomorrow as I am
now working on something else for the rest of the afternoon, but it
sounds likely...the code is very old code that I am having to support
that is a bit dodgy.
*** Sent via Developersdex http://www.developersdex.com ***
Mar 5 '07 #3

"Mike P" <mi*******@gmail.comwrote in message
news:OS*************@TK2MSFTNGP03.phx.gbl...
>I am repeatedly getting the error message 'error converting datatype
varchar to bit'. I am passing a varchar variable to a stored procedure
(where it is also a varchar) and then trying to write it to a table
(where it is also a varchar). I have no idea why it is trying to
convert it to a bit, it is very puzzling. Has anybody else had an error
like this?
If you're accessing the data via a view and any of the underlying tables
have changed since the view was created, you must recompile the view, either
by executing sp_recompile, or by changing the view (even in some meaningless
way, like adding a space to the end of its T-SQL statement) and saving it.

-Mark

>
*** Sent via Developersdex http://www.developersdex.com ***

Mar 6 '07 #4

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

Similar topics

10
by: | last post by:
I am accessing the same error-containing ASP page on an ISP server using w2k IE6 but with different effect. On the first computer I get several...
9
by: Mairhtin O'Feannag | last post by:
Hello, We have two machines we wish to use DPF. They are both RH ES 2.1, with DB2 8.2. I read the documentation CAREFULLY, and added the...
6
by: Squirrel | last post by:
I have a command button on a subform to delete a record. The only statement in the subroutine is: DoCmd.RunCommand acCmdDeleteRecord The...
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following...
10
by: Shawn | last post by:
JIT Debugging failed with the following error: Access is denied. JIT Debugging was initiated by the following account 'PLISKEN\ASPNET' I get this...
16
by: | last post by:
Hi all, I have a website running on beta 2.0 on server 2003 web sp1 and I keep getting the following error:- Error In:...
10
by: Rider | last post by:
Hi, simple(?) question about asp.net configuration.. I've installed ASP.NET 2.0 QuickStart Sample successfully. But, When I'm first start...
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent:...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

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.