G
Guest
Im running Vb.net 2003 and SQL2005
I manage to create a DataSet ( Client_RS ) and bind the data to the
textboxes,
I know there are about 450 records ( rows ) returned in the dataset but when
i
try to navigate through it row by row the display data for strLicence.text,
does not change
Im trying to produce a data input / amend screen where users can add and
update records, but all the examples i have found seen to only relate to
datagrids
Can Anybody give me any pointers?
Private 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.SQL2005_ADMINRS")
Try
LoadControls(0)
Catch ex As Exception
' Put In error trapping Here
' Temporary Message
MsgBox("Error Seeking 1st Record " & ex.Message)
' End Temporary Message
End Try
BindControls()
Catch ex As Exception
' Put In error trapping Here
' Temporary Message
MsgBox("Error Generating Recordset " & ex.Message)
' End Temporary Message
End Try
End Sub
' Navigation controls
Private Sub RS_Navagate(ByVal CURRENT_ROW As Integer, ByVal Directon As
Integer)
Const NEXTRECORD As Integer = 0
Const PREVIOUSRECORD As Integer = 1
Const FIRSTRECORD As Integer = 2
Const LASTRECORD As Integer = 3
Select Case Directon
Case NEXTRECORD
If CURRENT_ROW <
Client_RS.Tables("TBL_ClientAdmin").Rows.Count - 1 Then
CURRENT_ROW += 1
End If
Case PREVIOUSRECORD
If CURRENT_ROW > 0 Then
CURRENT_ROW -= 1
End If
Case FIRSTRECORD
CURRENT_ROW = 0
Case LASTRECORD
CURRENT_ROW = Client_RS.Tables("TBL_ClientAdmin").Rows.Count
- 1
End Select
End Sub
Protected Sub BindControls()
strLicence.DataBindings.Add("text", Client_RS,
"TBL_ClientAdmin.Licence")
End Sub
I manage to create a DataSet ( Client_RS ) and bind the data to the
textboxes,
I know there are about 450 records ( rows ) returned in the dataset but when
i
try to navigate through it row by row the display data for strLicence.text,
does not change
Im trying to produce a data input / amend screen where users can add and
update records, but all the examples i have found seen to only relate to
datagrids
Can Anybody give me any pointers?
Private 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.SQL2005_ADMINRS")
Try
LoadControls(0)
Catch ex As Exception
' Put In error trapping Here
' Temporary Message
MsgBox("Error Seeking 1st Record " & ex.Message)
' End Temporary Message
End Try
BindControls()
Catch ex As Exception
' Put In error trapping Here
' Temporary Message
MsgBox("Error Generating Recordset " & ex.Message)
' End Temporary Message
End Try
End Sub
' Navigation controls
Private Sub RS_Navagate(ByVal CURRENT_ROW As Integer, ByVal Directon As
Integer)
Const NEXTRECORD As Integer = 0
Const PREVIOUSRECORD As Integer = 1
Const FIRSTRECORD As Integer = 2
Const LASTRECORD As Integer = 3
Select Case Directon
Case NEXTRECORD
If CURRENT_ROW <
Client_RS.Tables("TBL_ClientAdmin").Rows.Count - 1 Then
CURRENT_ROW += 1
End If
Case PREVIOUSRECORD
If CURRENT_ROW > 0 Then
CURRENT_ROW -= 1
End If
Case FIRSTRECORD
CURRENT_ROW = 0
Case LASTRECORD
CURRENT_ROW = Client_RS.Tables("TBL_ClientAdmin").Rows.Count
- 1
End Select
End Sub
Protected Sub BindControls()
strLicence.DataBindings.Add("text", Client_RS,
"TBL_ClientAdmin.Licence")
End Sub