-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: DotNetHunk
Message 9 in Discussion
hmm,jus' tried using the following code yaar.still it says,no records found.
yah i used ::DataView.RowFilter="(emp_skill1 LIKE " ' + emp_skill1 + "%" + ' ")
AND (emp_experience_years >=' + exp + ' )"
pl check
Sub BindTheData()
Dim objConn As SqlConnection
Dim objDrop1, objDrop2 As SqlCommand
objConn = New SqlConnection("data source=localhost;user
id=sa;password=;initial catalog=onlinejobapp")
Try
objConn.Open()
Dim strDrop1, strDrop2 As String
Dim da As SqlDataAdapter = New SqlDataAdapter("SELECT * from
employerview", objConn)
da.Fill(ds, "employerview")
ds.Tables(0).TableName = "employerview"
dv = New DataView(ds.Tables(0))
dv.RowStateFilter = DataViewRowState.CurrentRows
DataGrid1.DataSource = dv
DataGrid1.DataBind()
strDrop1 = "select * from skill where skill<>''"
objDrop1 = New SqlCommand(strDrop1, objConn)
objDR1 = objDrop1.ExecuteReader
DropDownList1.DataSource = objDR1
DropDownList1.DataBind()
DropDownList1.Items.Insert(0, New ListItem("-- Choose a Skill
--"))
objDR1.Close()
strDrop2 = "select distinct emp_experience_years from
emp_summary "
objDrop2 = New SqlCommand(strDrop2, objConn)
objDR2 = objDrop2.ExecuteReader
DropDownList2.DataSource = objDR2
DropDownList2.DataBind()
DropDownList2.Items.Insert(0, New ListItem("-- Choose
Experience --"))
objDR2.Close()
Catch
Finally
If objConn.State = ConnectionState.Open Then
objConn.Close()
objConn.Dispose()
End If
End Try
End Sub
Sub SearchIT(ByVal sender As System.Object, ByVal e As System.EventArgs)
'DataView1.RowFilter = "emp_experience_years=" &
CInt(DropDownList1.SelectedItem.Value)
Dim skill As String = DropDownList1.SelectedItem.Value
Dim exp As Integer = CInt(DropDownList2.SelectedItem.Value)
Dim result As String
dv.RowFilter = "(emp_skill1 LIKE '" + skill + "%" + "') AND
(emp_experience_years >=' + exp + ' )"
'dv.RowFilter = result '"emp_skill1 like 'skill'" 'result
'dv.RowFilter = "emp_skill1 Like '" + skill + " ' 'AND
"emp_experience_years >= ' "+ exp + ''
lblDV.Text = "one::" & DropDownList1.SelectedItem.Value & "two:::"
& DropDownList2.SelectedItem.Value
'lblDV.Text += dv.Count
If dv.Count > 0 Then
DataGrid1.DataBind()
lblMsg.Text = dv.Count & " row(s) found...."
DataGrid1.Visible = True
Else
lblMsg.Text = "No records found.."
DataGrid1.Visible = False
End If
End Sub
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]