Hi
I am fetching the data in a datagrid from Oracle DB. At some places the data is not correct. Like if it's ASH in DB then only AS is displayed in the datagrid. I hope I am using the correct code. Below is the code I am using:
Dim con As New OracleConnection("Password=a;" & _
"User ID=opd;Data Source=bkp;")
Dim dataset As New DataSet()
Dim str As String
con.Open()
str = "select substr(from_date,1,9) as START_DATE,substr(end_date,1,9) as END_DATE ,leave_days,substr(sanctioned_by,1,3) as SANCTIONED_BY,substr(date_of_application,1,9) as Application_date from detail_leave where emp_code='" + empcode.Text + "' and leave_type='" + type.SelectedItem.Text + "'"
Dim dataadapter As New OracleDataAdapter(str, con)
dataadapter.Fill(dataset)
dg.DataSource = dataset
dg.DataBind()
con.Close()
Pls Help me out.
Regards,
Ashima