473,378 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

'Incremental Search' of data base or "Wheres the 'Seek' method

Hi,
I am both new to .Net (coming from VB6 and DAO) and to this news group. I
am trying to convert some code from VB6 that uses a "record set" to help the
user locate a specific record.
As the user types into a text box, the grid position changes.
example:

rs.index = "CompanyName"
..
..
..
Private Sub txtCompanyName_Changed()
rs .seek ">=", txtCompanyName.Text
..
..
..
I not only can't find a "seek" function for a table in a dataset, I can't
find any mention of an index for a table in a dataset! Am I missing
something? I hope the solution is not that I have to issue a new SELECT
with a sort by clause and then a loop with a move next statement!

Any help would be greatly appreciated!
Terry
May 11 '06 #1
4 2244

"Terry" <Te********@hotmail.com> wrote in message
news:uR*************@TK2MSFTNGP02.phx.gbl...
Hi,
I am both new to .Net (coming from VB6 and DAO) and to this news group. I
am trying to convert some code from VB6 that uses a "record set" to help the user locate a specific record.
As the user types into a text box, the grid position changes.
example:

rs.index = "CompanyName"
.
.
.
Private Sub txtCompanyName_Changed()
rs .seek ">=", txtCompanyName.Text
.
.
.
I not only can't find a "seek" function for a table in a dataset, I can't
find any mention of an index for a table in a dataset! Am I missing
something? I hope the solution is not that I have to issue a new SELECT
with a sort by clause and then a loop with a move next statement!

Any help would be greatly appreciated!
Terry


--
<response type="generic" language="VB.Net">
This newsgroup is for users of Visual Basic version 6.0
and earlier and not the misleadingly named VB.Net
or VB 200x. Solutions, and often even the questions,
for one platform will be meaningless in the other.
When VB.Net was released Microsoft created new newsgroups
devoted to the new platform so that neither group of
developers need wade through the clutter of unrelated
topics. Look for newsgroups with the words "dotnet",
"framework", or "vsnet" in their name.

For the news.microsoft.com news server try these:

news://msnews.microsoft.com/
microsoft.public.dotnet.languages.vb.upgrade
microsoft.public.dotnet.languages.vb.controls
microsoft.public.dotnet.languages.vb.data
microsoft.public.dotnet.framework.adonet
microsoft.public.dotnet.framework.windowsforms.con trols
microsoft.public.dotnet.framework.windowsforms.dat abinding
</response>
May 11 '06 #2
Terry,

If you are used to recordset, than don't try to compare them with datasets.
The datatable is the most neares.

A datatable hold datacolumns and datarows.

The datacolumns describes the items in a datarow
Every datarow has data items.

And than we have very much methods where ADO has one
There is the
DataView rowfilter
DataView find
DataTAble select
DataRowCollection find
And more

http://msdn2.microsoft.com/en-us/lib...tion.find.aspx

I think that the one above meets the solution to your current problem the
most.

I hope this helps,

Cpr

"Terry" <Te********@hotmail.com> schreef in bericht
news:uR*************@TK2MSFTNGP02.phx.gbl...
Hi,
I am both new to .Net (coming from VB6 and DAO) and to this news group. I
am trying to convert some code from VB6 that uses a "record set" to help
the user locate a specific record.
As the user types into a text box, the grid position changes.
example:

rs.index = "CompanyName"
.
.
.
Private Sub txtCompanyName_Changed()
rs .seek ">=", txtCompanyName.Text
.
.
.
I not only can't find a "seek" function for a table in a dataset, I can't
find any mention of an index for a table in a dataset! Am I missing
something? I hope the solution is not that I have to issue a new SELECT
with a sort by clause and then a loop with a move next statement!

Any help would be greatly appreciated!
Terry

May 11 '06 #3
Hi,
I do not wish to "filter " the results, I want to position the current
row. The 'find' method requires that I already know the value being
sought, which obviously is not the case. For example,
when the
user type 'M' in the text box, I want the top row of the DataView to be the
first company name that starts with 'M' and when he then types a 'i' I want
the top row to be the first entry that starts with 'Mi' etc. If no such
entry exists, the DataView would still be positioned at the first record
starting with 'M' as opposed to having an empty DataView, which would be the
result of setting a filter for the first 2 characters of company name being
"Mi".
So, I ask again, how do I quickly "position" the datagridview?
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:O$**************@TK2MSFTNGP04.phx.gbl...
Terry,

If you are used to recordset, than don't try to compare them with
datasets. The datatable is the most neares.

A datatable hold datacolumns and datarows.

The datacolumns describes the items in a datarow
Every datarow has data items.

And than we have very much methods where ADO has one
There is the
DataView rowfilter
DataView find
DataTAble select
DataRowCollection find
And more

http://msdn2.microsoft.com/en-us/lib...tion.find.aspx

I think that the one above meets the solution to your current problem the
most.

I hope this helps,

Cpr

"Terry" <Te********@hotmail.com> schreef in bericht
news:uR*************@TK2MSFTNGP02.phx.gbl...
Hi,
I am both new to .Net (coming from VB6 and DAO) and to this news group.
I am trying to convert some code from VB6 that uses a "record set" to
help the user locate a specific record.
As the user types into a text box, the grid position changes.
example:

rs.index = "CompanyName"
.
.
.
Private Sub txtCompanyName_Changed()
rs .seek ">=", txtCompanyName.Text
.
.
.
I not only can't find a "seek" function for a table in a dataset, I can't
find any mention of an index for a table in a dataset! Am I missing
something? I hope the solution is not that I have to issue a new SELECT
with a sort by clause and then a loop with a move next statement!

Any help would be greatly appreciated!
Terry


May 12 '06 #4
Terry,

Sorry but "postition" in Net means the place that a row has inside its
collection, which is showed or whatever.

"Sort" means to set them in a special sequence,

I cannot change the used terminology

Therefore do you need a position or do you want to show the rows in a
special sorted way.

The DataGridView has no position but has a rowindex.

Cor

"Terry" <Te********@hotmail.com> schreef in bericht
news:uP**************@TK2MSFTNGP03.phx.gbl...
Hi,
I do not wish to "filter " the results, I want to position the current
row. The 'find' method requires that I already know the value being
sought, which obviously is not the case. For example,
when the
user type 'M' in the text box, I want the top row of the DataView to be
the first company name that starts with 'M' and when he then types a 'i' I
want the top row to be the first entry that starts with 'Mi' etc. If no
such entry exists, the DataView would still be positioned at the first
record starting with 'M' as opposed to having an empty DataView, which
would be the result of setting a filter for the first 2 characters of
company name being "Mi".
So, I ask again, how do I quickly "position" the datagridview?
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:O$**************@TK2MSFTNGP04.phx.gbl...
Terry,

If you are used to recordset, than don't try to compare them with
datasets. The datatable is the most neares.

A datatable hold datacolumns and datarows.

The datacolumns describes the items in a datarow
Every datarow has data items.

And than we have very much methods where ADO has one
There is the
DataView rowfilter
DataView find
DataTAble select
DataRowCollection find
And more

http://msdn2.microsoft.com/en-us/lib...tion.find.aspx

I think that the one above meets the solution to your current problem the
most.

I hope this helps,

Cpr

"Terry" <Te********@hotmail.com> schreef in bericht
news:uR*************@TK2MSFTNGP02.phx.gbl...
Hi,
I am both new to .Net (coming from VB6 and DAO) and to this news group.
I am trying to convert some code from VB6 that uses a "record set" to
help the user locate a specific record.
As the user types into a text box, the grid position changes.
example:

rs.index = "CompanyName"
.
.
.
Private Sub txtCompanyName_Changed()
rs .seek ">=", txtCompanyName.Text
.
.
.
I not only can't find a "seek" function for a table in a dataset, I
can't find any mention of an index for a table in a dataset! Am I
missing something? I hope the solution is not that I have to issue a
new SELECT with a sort by clause and then a loop with a move next
statement!

Any help would be greatly appreciated!
Terry



May 12 '06 #5

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

Similar topics

0
by: scorpion | last post by:
This question is more XML Security (and specifically, on the Apache XML security implementation). When I sign or open signed XML document, I see the following warning: .... WARNING: Found an...
0
by: Thomas Sturm | last post by:
Hi, I try to perform a search with the search method of the application object: "Set FolderObj = VhlApplObj.Search(ItemTypeName, Criteria, True, OLEAPI_DOCS_AND_FLDRS, OLEAPI_ALL_STATUS,...
1
by: jphelan | last post by:
I ran a MS Access Analyzer program that suggested changing, "rst.FindFirst strcriteria" to using the, "Seek" instead. I tried making the change. I get a Compile error that says, "Argument is not...
12
by: DrBonzo | last post by:
Given public class A { virtual void foo() { ... } } public class B : A { public override void foo() { ... } public Bthingy() { ... base.foo() ...} }
59
by: Rico | last post by:
Hello, I have an application that I'm converting to Access 2003 and SQL Server 2005 Express. The application uses extensive use of DAO and the SEEK method on indexes. I'm having an issue when...
15
by: djtosh | last post by:
hi there hoping someone can help me out with this. im designing a code that is a basic database holding peoples details and i need to implement a method that searches by txt for a record by their...
8
by: Ben Amada | last post by:
Hi all. I know very little about regular expressions, but wanted to use one to validate an email address a user would be entering before the form is submitted. There are many examples out there. ...
6
by: fdespoux | last post by:
I have a search form that searches for the criteria selected. I'm want to get the search method to look into multiple textboxes instead of just one. Please help I'm fairly new to Access/VBA. My code...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.