473,385 Members | 1,546 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,385 software developers and data experts.

Read pointer in listbox or combibox



Hi,

How can we set and read the pointer in a listbox or a combibox to the
found search. We use the datarow function with SQL2000 and VB.NET.

Hope anyone can help

Regards, Martin
Nov 21 '05 #1
2 1062

"Martin Heuckeroth" <ni**@nospam.invalid> wrote in message
news:34********************************@4ax.com...
How can we set and read the pointer in a listbox or a combibox to the
found search. We use the datarow function with SQL2000 and VB.NET.

Hope anyone can help


Some folks may take a guess, but I recommend that you give a little more
detail. I for one don't really understand what you're trying to do. Some
sample code of what you've already tried would be helpful, too.
Nov 21 '05 #2

OK here is some code we made up. We created a While loop to find the
recordnumber in the table. All this to set the pointer to the right
item. Not a very fast method when a table gets large as it will. The
current procedure needs to to scroll through every time we lookup a
number. So how can we do better. We understand it is best NOT to use
recordnumbers. So we gave every record a unique indexnumber and set
the key to that but somehow we cant set the pointer to that indexkey
in the table.

English is not our native language as is VB yet! Hope any of you can
help us.
Me.BindingContext(DsNewsTitle1, "IsDsNewsTitle").Position =
SearchNews(DsNewsRoomTemp1, DsNewsTitle1, "IsDsNewsRoom",
"IsDsNewsTitle", "ID_IsDsNewsTitle", "Subject", 5)

Function SearchNews(ByVal cDataSetRoot, ByVal cDataSetSearch, ByVal
cRootTable, ByVal cSearchTable, ByVal cSearchKey, ByVal cField, ByVal
nField)
Dim nEnd As Integer = Me.BindingContext(cDataSetSearch,
cSearchTable).Count
Dim cFound As String =
(cDataSetRoot.Tables(cRootTable).Rows(FormNews.nTa bleNewsRoom -
1)(cSearchKey)).ToString
Dim cFoundRow As DataRow =
cDataSetSearch.Tables(cSearchTable).Rows.Find(cFou nd)
Dim nRecord As Integer = 0
If Not (cFoundRow Is Nothing) Then
Do While nRecord < nEnd
If
cDataSetSearch.Tables(cSearchTable).Rows(nRecord)( cField) =
cFoundRow(nField) Then Exit Do
nRecord += 1
Loop
If nRecord = nEnd Then Return 0
Return nRecord
End If
End Function

On Tue, 7 Sep 2004 15:22:43 -0400, "Jeff Johnson [MVP: VB]"
<i.***@enough.spam> wrote:

"Martin Heuckeroth" <ni**@nospam.invalid> wrote in message
news:34********************************@4ax.com.. .
How can we set and read the pointer in a listbox or a combibox to the
found search. We use the datarow function with SQL2000 and VB.NET.

Hope anyone can help


Some folks may take a guess, but I recommend that you give a little more
detail. I for one don't really understand what you're trying to do. Some
sample code of what you've already tried would be helpful, too.


Nov 21 '05 #3

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

Similar topics

3
by: Konan | last post by:
Pardon the simple question, but I have just begun to learn PHP. So far so good - all the examples in my books actually work. One thing that none of them address is how to read a file of strings...
6
by: Christina | last post by:
I want to read a classic HTML Form using the ASP Request object on the server. This is a common approach. But how can I read all the contents of a listbox (the <select> tag)? Best regards,...
10
by: Mudasir Ahmed | last post by:
I Guys : I am working on a Application to read barcodes from a scanner and list them in a ListBox on a web page. I was wondering if any one has done a similar job. Currently I have attached the...
2
by: JP | last post by:
Hi, I am trying to loop through the listbox and read the selected items from the list, within a CLICK event on an aspx page. The following is what I have tried. It loops through the listbox,...
3
by: Richard Albrecht | last post by:
I have been trying to figure out for days on how to read values from a Bound ListBox. The listBox gets the values from an Access Table. I can read values fine for Non-Bound ListBoxes, But the...
4
by: CrimeMaster | last post by:
HI I have an Exe file when it runs ,there are just two controls on the window.One is a ListBox and another is a Multi line Rich Edit control.When i click on an item in the list some text is...
5
by: Steven Blair | last post by:
I need to write an ASP.NET application which can do the following: 1. Create a socket which will stay alive and continously read data. 2. The data read needs to be displayed on the webpage. 3....
10
by: Evolution445 | last post by:
I got a textbox, from where people can add textstrings to a listbox. From there, I want, once a person clicks "Start", the program types the first string from the list. After the interval the...
6
by: kimiraikkonen | last post by:
Hi, I want to save all the item content of a listbox line by line into a simple text file then recall them when my project is opened. For example listbox1 contains: That - item1 Group ...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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.