Microsoft TDC (Tabular Data Control) Search function

O

Omicron

I have a simple comma-delimited database file that I read using
Microsoft's TDC.
All works as it should.
What I do not know how to achieve, however is the following;
When performing a search, the TDC brings to the screen the hits it
gets from my database file, as it should. What I'd like to do is have
the numerical value of the quantity of hits it found.
In other words, if my complete database contains 1000 records, and
based on the Search criteria asked of the TDC, the result is that 150
of those 1000 records are brought to the screen, how can I get that
numerical value of 150, so that I can manipulate it (e.g. bring it to
the screen, use it for some other purpose, etc)?
Is there a variable I can use? Some Jscript that can be coded to pull
it out?
I can find nothing about this type of data from the TDC in the
Microsoft MSDN Libraries.

I'd like to be able to state to a user that his search has yielded 150
results, so he doesn't have to try to count the hits on the screen!

I'd appreciate any help you folks could provide.
Thank you.
 
O

Omicron

The documentation is here:
<URL:http://msdn2.microsoft.com/en-us/library/ms531388(vs.85).aspx>.
I am not sure it answers your question, check yourself.

Thank you Martin for your quick response to my query.
Unfortunately, I found that section of the MSDN many weeks ago and
have not found anything related to my requirements. Of course, it is
possible that it is indeed in there, but thus far, I've had no luck in
determining where.
Thank you again, however.
 
V

VK

Thank you Martin for your quick response to my query.
Unfortunately, I found that section of the MSDN many weeks ago and
have not found anything related to my requirements. Of course, it is
possible that it is indeed in there, but thus far, I've had no luck in
determining where.
Thank you again, however.

The TDC docs do not say that because
1) they are rather (very?) ugly written.
2) this is up to user to define the amount of displayed records, so
nothing to ask from TDC

If your query returns 1,000 hits, it is up to your interface how to
display them: all 1,000 rows at once or say only 10-25-50 of them per
page with navigation buttons to move back and forward. This settings
is regulated by dataPageSize property of the TABLE element binded to
your TDC.
 
O

Omicron

The TDC docs do not say that because
1) they are rather (very?) ugly written.
2) this is up to user to define the amount of displayed records, so
nothing to ask from TDC

If your query returns 1,000 hits, it is up to your interface how to
display them: all 1,000 rows at once or say only 10-25-50 of them per
page with navigation buttons to move back and forward. This settings
is regulated by dataPageSize property of the TABLE element binded to
your TDC.

Hello again,
Thank you (again) for your communications.
Perhaps I'm not being clear with my needs:
I'm not having any issues with formatting the output of the data.
I'm looking for a method of knowing HOW many hits come from the Search
Result after the user enters his criteria and gets his answer.
Again, in my example, if the final result of the search is going to
yield 150 hits, I need to be able to get that value as a variable of
some sort. I know how to format the output but I do not know how to
get the actual numerical count associated with that data.
I'd like to have the following sentence appear on the screen after the
search has completed:
YOUR SEARCH HAS YIELDED 150 RESULTS
As you can see, to achieve this, I need someway of knowing that the
total results from the search was 150.
Currently, I see no way of getting that information.
Thanks for any additional ideas or suggestions.
 
V

VK

Hello again,
Thank you (again) for your communications.

The first time it was not me (VK) but Martin Honnen :)
Perhaps I'm not being clear with my needs:
I'm not having any issues with formatting the output of the data.
I'm looking for a method of knowing HOW many hits come from the Search
Result after the user enters his criteria and gets his answer.

Oh, sorry then. There definitely must be a field or a method for that.
I did not have work tasks with TDC since the last fall so it is not on
the "tip of my fingers" right now. I am uneasy to discuss clearly and
explicitly Microsoft-only solution at c.l.j. Nothing personal, please,
but the dress code of this NG assumes universal cross-browser
solutions. At microsoft.public.scripting.jscript you may get a quicker
answer to your question. Still if anything pops up in my mind I will
not keep it in secret :)
 
O

Omicron

The first time it was not me (VK) but Martin Honnen :)


Oh, sorry then. There definitely must be a field or a method for that.
I did not have work tasks with TDC since the last fall so it is not on
the "tip of my fingers" right now. I am uneasy to discuss clearly and
explicitly Microsoft-only solution at c.l.j. Nothing personal, please,
but the dress code of this NG assumes universal cross-browser
solutions. At microsoft.public.scripting.jscript you may get a quicker
answer to your question. Still if anything pops up in my mind I will
not keep it in secret :)

Ok,
Thanks VK.
I appreciate any ideas you might think of.
Regards.
 
V

VK

Ok,
Thanks VK.
I appreciate any ideas you might think of.
Regards.

Oh, just pumped on me: TDC OBJECT ondatasetavailable(? by memory
typing) exposes .recordset object representing the current query
result and it has .recordCount property and stuff. You just need to
query everything after right events so after all data retrieved.
 
O

Omicron

Oh, just pumped on me: TDC OBJECT ondatasetavailable(? by memory
typing) exposes .recordset object representing the current query
result and it has .recordCount property and stuff. You just need to
query everything after right events so after all data retrieved.

Well, your last comment seemed like my best hope but i've not been
able to figure out the manipulation of the code to involved. The
truth, of course, is that I know very, very little when it comes to
using any aspect of the TDC system. I found references
to .recordcount but how it is to be used seems to be beyond me. Most
of what i did find once again (frustratingly) seems related to the
ENTIRE database and I do not have the wherewithall to apply it to my
specific needs with the Search results.
Thanks again.
 
H

helspwn

I have a simple comma-delimited database file that I read using
Microsoft's TDC.
All works as it should.
What I do not know how to achieve, however is the following;
When performing a search, the TDC brings to the screen the hits it
gets from my database file, as it should. What I'd like to do is have
the numerical value of the quantity of hits it found.
In other words, if my complete database contains 1000 records, and
based on the Search criteria asked of the TDC, the result is that 150
of those 1000 records are brought to the screen, how can I get that
numerical value of 150, so that I can manipulate it (e.g. bring it to
the screen, use it for some other purpose, etc)?
Is there a variable I can use? Some Jscript that can be coded to pull
it out?
I can find nothing about this type of data from the TDC in the
Microsoft MSDN Libraries.

I'd like to be able to state to a user that his search has yielded 150
results, so he doesn't have to try to count the hits on the screen!

I'd appreciate any help you folks could provide.
Thank you.

Try this from your script

document.getElementById('fData').innerHTML =
elem_list.recordset.RecordCount


<table><tr><td id="fData"></td></tr></table>

this displays the acctual count of only the records I needed and not
the full count.

This works great for me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top