473,597 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Conversion failed when converting the varchar value to data type bit.

31 New Member
When I try to insert values into an existing table, I am getting the following error. The table is not in bit data type format and neither is the target table. Conversion failed when converting the varchar value 'JOHN KUCHTA' to data type bit. Please help.
JOELL
Aug 15 '10 #1
5 6698
NeoPa
32,566 Recognized Expert Moderator MVP
You want us to find the problem with your code without seeing the code?

Come on. Let's start with the basics at least.
Aug 15 '10 #2
Joell
31 New Member
I am sorry I didnt send before. I am new to this type of help.

Here is my simple code:

INSERT PROF
select * from Chicaco_TEST


I have now checked all of the BIT data types and none of them are NULL. I dont know why the error message says it is a BIT type when neither the source or target table for that field is data type BIT.
Aug 15 '10 #3
NeoPa
32,566 Recognized Expert Moderator MVP
No worries Joell. We all started somewhere.

With code like this though, particularly with SELECT *, I think we'll need some meta-data for the two tables. Please list all the fields in both tables and give their data types. I can't promise much as my SQL Server (T-SQL) is a bit rusty, but if it's something I can see I'll be happy to help.
Aug 16 '10 #4
Joell
31 New Member
Thank you for your help. I completed started over and made the insert using all fields instead of using the * for all. Populating a value for each field worked. I appreciate the help.
Aug 16 '10 #5
NeoPa
32,566 Recognized Expert Moderator MVP
You're too kind Joell. It seems you responded well to a little nudge, and managed to find a solution on your own. Good for you :)
Aug 16 '10 #6

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

Similar topics

4
25240
by: Saso Zagoranski | last post by:
Hi! I have created an SqlCommand object and I have set some parameters to it... One of the parameters is of the DateTime type; here is the code: sqlCommand.Parameters.Value = DateTime.Parse(this.DateTextBox.Text); sqlCommand.ExecuteNonReader(); I get the error:
1
4510
by: Sebastian Mark | last post by:
Did anyone got error like that? When I'm trying to Update WebReference in my project this is an error I'm getting "Custom tool error: Failed to generate dataset. Undefined data type: 'anyType'." The anyType is really a GUID. The problem is its working fine on my friends computer (they get string insted of anyType) and it complies fine. I even tried to reinstall VS.NET 2003 but no positive result. Does anyone had that problem before?
4
7602
by: darrel | last post by:
I'm getting this error: Arithmetic overflow error converting numeric to data type numeric. Triggered on this line of my code: objOleDbAdapter.Fill(DS, "rss") Everything works when this is pointed at one DB server (our staging server) but when we point it at another DB server (our production server) I get the error.
1
18842
by: sonata | last post by:
I am trying to compare two fields which are char data typr. BUT the comparision must be arithemetic in nature. so i tried to cast both the data base field and my parameter field to big int types which failed. I tried for Decimal type conversion and then comparision. It gave me the above error.
2
12640
by: Hulikal | last post by:
Hi, I using the following query select dateadd(s, 1185255439727, '01-01-1970 05:30:00') on MSSQL 2005. I get the error Arithmetic overflow error converting expression to data type int. If I use the query
5
7317
by: ITCraze | last post by:
Please Guys help me out , as I need the solution of this problem very fast.Please help me. My table contains a varchar field which contains time like : 04:09PM Now the problem is that I have to convert this into time.Please help me to suggest how to convert this data into time as I have to create various reports. I have also tried to put time datatype instead of varchar.But when I inserted this value -it gives error like this:
2
11171
by: bipinskulkarni | last post by:
Hi, i have a field createdby with datatype GUID. In following query ,i encountered with the error "Conversion failed when converting from a character string to uniqueidentifier" select ISNULL(VW_tbl_ChildProducts.createdBy,' ' ) as createdBy from table.
9
24276
by: gggram2000 | last post by:
I need some help, cant figure out the error. SqlConnection dbConnection = new SqlConnection(xmldb); dbConnection.Open(); string sql = "SELECT InvStatus FROM SaleReceipts Where AccNum = '" + lblAccNum.Text + "' "; SqlCommand command = new SqlCommand(sql, dbConnection); SqlDataReader reader = command.ExecuteReader(); while (reader.Read()) { InvoiceStatus = reader.ToString(); }
1
3852
by: vertigo262 | last post by:
This is driving me crazy I run this query in the sql management studio and it works fine. but seems like it doesn't work in the stored procedure Can I not use a LIKE '%' in an integer field? here is my stored procedure USE
0
7885
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
8272
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
8381
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
8258
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...
0
6687
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5847
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
3882
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...
0
3923
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1233
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.