-1
這是我的scenerio。在數據庫中插入數據的條件
I have a combo box which has 8 items. {items : a,b,c,d,e,f,g,h}
我有一個列員工表。
if i select a and when i insert that into my database table,it should be 1
if i select b and when i insert that into my database table,it should be 1 and so on for 8 items.
我想做的是:
objSQLParms(12) = New SqlParameter("@Employee_Type", SqlDbType.SmallInt)
If cmbList.Text.Trim = "Employee" Then
If cmbemployee.Text.Trim.Length = 0 Then
objSQLParms(12).Value = 0
Else
objSQLParms(12).Value = cmbemployee.Text.Trim.Substring(0, 1)
End If
Else
objSQLParms(12).Value = 0
通過這樣做,我得到只存在於組合框中值。 如何在這個場景中編寫案例來獲取數字。
在此先感謝