473,387 Members | 1,897 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,387 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 2473
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 line of HTML outputed by ASP, shown correctly by...
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 following line to my db2nodes.cfg file : 1 egret 0
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 subform's recordsource is "select * from tblVisit order...
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 error message: "The Web server reported...
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 messag in a dialog window when I try to open an...
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 application the follow message shown. ========= Server...
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: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.