VB.Net 2003 & SQL2005
Ive been trying to find a way to search a Dataset for a value in a colum
then move the
currency manager to that row ?
ie search for "211001" in the Column "Licence"
Private Manager As CurrencyManager
Dim WithEvents Client_RS As New DataSet
' Load the DataSet with the client admin recordset
Private Sub LoadDataSet()
' Try to retrieve the records
Try
Client_RS = GetSQLDataSet(" EXEC
Bossdata.dbo.SQ L2005_CLIENTADM INRS")
Try
LoadControls(0)
BindControls()
Catch ex As Exception
MsgBox("Error Seeking 1st Record " & ex.Message)
End Try
Catch ex As Exception
' Pit In error trapping Here
MsgBox("Error Generating Recordset " & ex.Message)
End Try
End Sub
Private Sub LoadControls(By Val CurrentRowPos As Integer)
'Set the current row number
CURRENT_ROW =
CInt((Client_RS .Tables("TBL_Cl ientAdmin").Row s(CurrentRowPos ).Item("IdCol") .ToString))
End Sub
Protected Sub BindControls()
' Bind the controls to the dataset
'Licence
strLicence.Data Bindings.Add("t ext", Client_RS,
"TBL_ClientAdmi n.Licence")
' Company Name
strCompanyName. DataBindings.Ad d(New Binding("Text", Client_RS,
"TBL_ClientAdmi n.CompanyName") )
' Set the Manager position to the current record
Manager = Me.BindingConte xt(Client_RS, "TBL_ClientAdmi n")
End Sub
Ive been trying to find a way to search a Dataset for a value in a colum
then move the
currency manager to that row ?
ie search for "211001" in the Column "Licence"
Private Manager As CurrencyManager
Dim WithEvents Client_RS As New DataSet
' Load the DataSet with the client admin recordset
Private Sub LoadDataSet()
' Try to retrieve the records
Try
Client_RS = GetSQLDataSet(" EXEC
Bossdata.dbo.SQ L2005_CLIENTADM INRS")
Try
LoadControls(0)
BindControls()
Catch ex As Exception
MsgBox("Error Seeking 1st Record " & ex.Message)
End Try
Catch ex As Exception
' Pit In error trapping Here
MsgBox("Error Generating Recordset " & ex.Message)
End Try
End Sub
Private Sub LoadControls(By Val CurrentRowPos As Integer)
'Set the current row number
CURRENT_ROW =
CInt((Client_RS .Tables("TBL_Cl ientAdmin").Row s(CurrentRowPos ).Item("IdCol") .ToString))
End Sub
Protected Sub BindControls()
' Bind the controls to the dataset
'Licence
strLicence.Data Bindings.Add("t ext", Client_RS,
"TBL_ClientAdmi n.Licence")
' Company Name
strCompanyName. DataBindings.Ad d(New Binding("Text", Client_RS,
"TBL_ClientAdmi n.CompanyName") )
' Set the Manager position to the current record
Manager = Me.BindingConte xt(Client_RS, "TBL_ClientAdmi n")
End Sub