Click here to Skip to main content
14,984,032 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

In datagrid i display in drop down list. that dropdownlist values from database using select query i bind that values as interger as well as that database column as i display 0th row i display '--SELECT--' how can i write code. i wrote code like this '
OracleDataAdapter1.SelectCommand = SelectCommand
            SelectCommand.Connection = Me.getOracleConnection
            SelectCommand.CommandText = "select shift_num from S_TR_SHIFT"
            dsprocess1.Tables(0).Rows.InsertAt(dsprocess1.Tables(0).NewRow, 0)
            dsprocess1.Tables(0).Rows(0).Item("SHIFT_NUM") = "--SELECT--"
display casting error pl give me a solution

Thanks & Regards.,

1 solution

SelectCommand.CommandText = "select '--SELECT--' UNION select shift_num from S_TR_SHIFT"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900