Boolean datatype column refuses to Copy to Bit datatype SQL Table

G

Guest

I have a table that I generate the schema for by way of
da.FillSchema(ds,schemaType.Source, StringLoadTable)
One of my columns (numerous columns actually) are created as System.Boolean
however the actual SQL column that the schema is pulled from is of datatype
Bit. I can successfully add data to this table in my dataset using "True"
and "False" for the columns that are created as Boolean, however when I
attempt to do some BCP operations on the table the BCP fails because the data
is not of Bit type and cannot be converted from String to Boolean (or so says
the error). So instead of "True" and "False" I attempted to use 1 and 0 in
my data, however when I do this I can not add the data to the table because
""String was not recognized as a valid Boolean.Couldn't store <0> in
feetypeinvfg Column. Expected type is Boolean.""
 
G

Guest

Once again I prematurely posted. The table that I created with the schema
was created with the schema from the live data table, however when I loaded
the table I wasn't loading it into my Live table, I was loading it into a
TEMP table which I thought was the exact same as my live table. Well one of
the columns in my Temp table was setup as BIT however i Had changed it in my
live table.
Moral of the story, look at the table you're trying to load, not the one you
pull the schema from.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top