我想从我的 SQL Server 2005 数据库中检索 checkboxlist 值,其中我有一个表,其中的列car
包含 n 个值,例如BMW,Jaguar,Royal
.
现在我想为复选框列表中的特定复选框检索它们;我试过了:
for (int x = 0; x < checkedListBox1.Items.Count; x++) {
if (checkedListBox1.CheckedItems[x].ToString()) {
checkedListBox1.Text = sdr.GetString(16).Split(",");
}
}
但它不工作。我收到以下错误:
'string.Split(params char[])' 的最佳重载方法匹配有一些无效参数
这是 SQL 查询:
select
RegisterNo, RegistrationDate, Stimulation, PationName,
DateOfBirth, ContactNo, Occupation, Age, Sex, Chief_Complain,
Investigation_Result, PastHistoryAny, Physical_Examination,
Ref_By_Doctor, Medications, Prognosis, Electro_Therapy,
Neuro_Rehabilitation, Ortho_Rehabilitation,
Cardio_Pulmonery_Rehabilitation, Sports_Rehabilitation
from
Physio_cureTable
where
RegisterNo = @RegisterNo
and Syncoperation <> 'D