473,473 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

searching a dataset

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.SQL2005_CLIENTADMINRS")
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(ByVal CurrentRowPos As Integer)
'Set the current row number
CURRENT_ROW =
CInt((Client_RS.Tables("TBL_ClientAdmin").Rows(Cur rentRowPos).Item("IdCol").ToString))
End Sub

Protected Sub BindControls()
' Bind the controls to the dataset
'Licence
strLicence.DataBindings.Add("text", Client_RS,
"TBL_ClientAdmin.Licence")
' Company Name
strCompanyName.DataBindings.Add(New Binding("Text", Client_RS,
"TBL_ClientAdmin.CompanyName"))
' Set the Manager position to the current record
Manager = Me.BindingContext(Client_RS, "TBL_ClientAdmin")
End Sub
Jul 12 '06 #1
0 913

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mario Rodriguez | last post by:
Hi I am trying to search activeDirectory through OLEDB and I am getting the exception like this DB_E_NOTABLE(0x80040E37) at OleDbDataAdapter.Fill method. My code look like this. ...
1
by: David | last post by:
Hello, I use the VS .NET 2003. Say I have a Windows form (with C# code, of course) which is connected to a database to one table. I can browse through the records, but I don't know how to...
5
by: David Wender | last post by:
I want to create a dataview with a sort on multiple columns. However, when I use FindRows, I only want to search some of the columns, not all. Is this possible? I have not been able to make it...
33
by: Geoff Jones | last post by:
Hiya I have a DataTable containing thousands of records. Each record has a primary key field called "ID" and another field called "PRODUCT" I want to retrieve the rows that satisy the following...
0
by: Muhammad Shoaib | last post by:
Hello Everybody! I'm using vb.net 2005 and MSSQL Server 2000 as back end i have little problem while i want to show only the data which i want, it gievs me problem infact i want to place a select...
5
by: Gowri | last post by:
Hello, I've been reading about ElementTreee and ElementPath so I could use them to find the right elements in the DOM. Unfortunately neither of these seem to offer XPath like capabilities where...
2
by: dibblm | last post by:
I'll start this hopefully simple and add code where needed or requested. Im using a combobox that bound to a DataSet. The Dataset retreives it's values from SQL. I can retreive the values...
1
by: gobblegob | last post by:
Hello Folks, I am searching a XML file for <Asset_Number> and then adding all children to DataGridView1, i can search but i dont know how to add item to the DataGridView Also my datagridview...
0
by: PeterSummer | last post by:
Could someone answer a vb.net database question? what is a good way to code a form so that a user could navigate through a dataset ie: MoveFirst, MoveNext, MovePrevious, MoveLast, Update and...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.