问题描述
亲爱的先生/女士,
我打算将Excel 2007数据导入我的数据库。在初始工作时,我正在使用OleDbDataAdapter将Excel工作表数据读入DataTable。但问题是我无法将CheckBox控件数据读入我的数据集。它显示复选框字段的空值。我正在分享我正在使用的代码行。
DataTable dtTrainers;
dadVET = new OleDbDataAdapter(Select * From [SheetName $] ,myConnection);
dtTrainers = new DataTable(TrainersAndAdminStaff);
dadVET.FillSchema(dtTrainers,SchemaType.Source);
dadVET.Fill(dtTrainers);
请尽快了解更新解决方案。
谢谢&问候,
T.Hari babu
电子邮箱:[email protected]
Dear Sir/Madam,
I am planning to import Excel 2007 data into my Database. As of initial work I am reading excel sheet data into DataTable using OleDbDataAdapter . But the problem is I am unable to read CheckBox controls data into my dataset. It is showing empty values for check box fields . I am sharing lines of code I am using.
DataTable dtTrainers;
dadVET = new OleDbDataAdapter("Select * From [SheetName$]", myConnection);
dtTrainers = new DataTable("TrainersAndAdminStaff");
dadVET.FillSchema(dtTrainers, SchemaType.Source);
dadVET.Fill(dtTrainers);
Please if you have any idea update solution asap.
Thanks & Regards,
T.Hari babu
E-Mail : [email protected]
推荐答案
这篇关于问题阅读包含CheckBoxes的Excel表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!