query 2)
Dim myselectquerya As String = "SELECT sta_category_id_fk FROM tbl_staff_assignments WHERE tbl_staff_assignments.sta_project_id_fk =(SELECT pr_project_id_pk FROM tbl_projects WHERE tbl_projects.pr_project_location = ?PName ) tbl_projects.pr_project_id_pk = ?CID "
cmSQL.Parameters.Add("?PName", objListItem)
cmSQL.Parameters.Add("?CID", 1)
hope this helps you.
thnx so much tht helped me....
i have other doubr nw....
Try
cnSQL.Open()
drSQL = cmSQL.ExecuteReader()
If drSQL.HasRows = True Then
While drSQL.Read
If drSQL.Item("sta_category_id_fk ") = "?CID" Then
MsgBox("Manager available in this project.. select other project or insert new project")
Else
insert record
my doubt is near ( If drSQL.Item("sta_category_id_fk ") = "?CID" Then )
is this right??? im not getting the result..
plz help..
thnx