Avatar of karthik80c
karthik80c
Flag for United States of America asked on

import issue in bit values

i have a issue in importing bit values in to database using SqlBulkCopy
Creating object of datatable :

  tblcsv.Columns.Add("EmailOptOut");
                tblcsv.Columns.Add("IsConverted");

Mapping Table column :

           objbulk.ColumnMappings.Add("EmailOptOut", "EmailOptOut");
             objbulk.ColumnMappings.Add("IsConverted", "IsConverted");


these are the bit column in sql database.when i am trying import,it showing some error
like
 "The given value of type String from the data source cannot be converted to type money of the specified bit column"
Microsoft SQL ServerC#

Avatar of undefined
Last Comment
karthik80c

8/22/2022 - Mon
SOLUTION
Vitor Montalvão

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Russ Suter

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
karthik80c

ASKER
thank you for your suggestions.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23