PDA

View Full Version : RE: Find Question



Dennis Piccioni
1-Feb-2005, 11:19 AM
Hi Joe,

these arguments are documented in the Class Reference. Just type
Request_Find into the help index and you will see it pop up a list of
all classes in which it is found. All arguments are documented in all of
the classes.

Regards,
Dennis

Dennis Piccioni
Data Access Worldwide
http://www.DataAccess.com/support


-----Original Message-----
From: Joe Coley [mailto:sjoec@charter.net]
Posted At: Tuesday, February 01, 2005 12:15 AM
Posted To: visual-dataflex
Conversation: Find Question
Subject: Find Question


I have the following code for where I want to do a "find GE" of the
Inventry_DD <snip>
Send Request_Clear to Inventry_DD
Move sValue to Inventry.Location
Move Product.Product_id to Inventry.Product_id
Send Request_Find to Inventry_DD

<snip>
My Request_Find creates an error message, and I've determined that I am
not giving it the arguments that it is expecting. How do I determine
the values of the arguments that the request find is looking for? (i.e.
Integer eFindMode Integer iFile integer iIndex )

Joe Coley
5-Feb-2005, 08:22 AM
RE: It's in the Help -- Yes, it is in the help, but if you don't understand
the help, it doesn't help! Examples are key (at least for me) to the help
being "helpful", and I got my examples here from the group, not the help in
this case. In the case of my problem in this thread, issuing the command
"send find of Inventry_dd GE index.1" as per Ian's suggestion is the only
thing that seems to work -- and I don't understand why it works either. If
I understand the help correctly it is looking for 3 arguments, each an
integer. Does "Inventry_dd", "GE", and "index.1" somehow magically get
converted to integers because each looks more like a string to me :-).

I've tried many variations for a "Send Request_Find ..." -- all with the
result of no record being found (and it IS there to be found). This
experience brings up another question -- how does one know when to just
"find", and when to "request_find"? ...also, why in this case might a
"request_find" not be appropriate? ((So many questions, so little time to
understand :-)"))

I am now experiencing a problem with displaying the results of my "send find
of Inventry_dd GE index.1" command, and again it points to somehow not
passing correct arguments, or arguments correctly. I will post my "display
problem" as the start of a new thread if I can't figure it out.


"Dennis Piccioni" <dennis-p@dataaccess.com> wrote in message
news:lrfOTnHCFHA.4548@dacmail.dataaccess.com...
Hi Joe,

these arguments are documented in the Class Reference. Just type
Request_Find into the help index and you will see it pop up a list of
all classes in which it is found. All arguments are documented in all of
the classes.

Regards,
Dennis

Dennis Piccioni
Data Access Worldwide
http://www.DataAccess.com/support


-----Original Message-----
From: Joe Coley [mailto:sjoec@charter.net]
Posted At: Tuesday, February 01, 2005 12:15 AM
Posted To: visual-dataflex
Conversation: Find Question
Subject: Find Question


I have the following code for where I want to do a "find GE" of the
Inventry_DD <snip>
Send Request_Clear to Inventry_DD
Move sValue to Inventry.Location
Move Product.Product_id to Inventry.Product_id
Send Request_Find to Inventry_DD

<snip>
My Request_Find creates an error message, and I've determined that I am
not giving it the arguments that it is expecting. How do I determine
the values of the arguments that the request find is looking for? (i.e.
Integer eFindMode Integer iFile integer iIndex )

Garret Mott
5-Feb-2005, 09:49 AM
Joe -

I too, often find the help less than helpful... Give me examples of real
code!!!!!! Every time I go to use a command that I'm not familiar with, I
breath a sigh of relief if I find a real example. If not, I know I have
maybe hours ahead of me trying to figure out the exact syntax & arguments
required. I'm not exaggerating about hours - when I first started with VDF,
I didn't know about this NG & figured it out for myself. I bet I spent 6
hours before I got all the Request_Save, Find, etc. msg.s working to my (&
the program's!) satisfaction. Examples would have had me going in minutes.

My interpretation of the help on this (since - as you say - there are no
examples) was that when finding with the DD the msg has to be sent with
integers (the code below assumes that the Client File is File # 3):

Send Request_Find of Client_DD GE 3 2
Instead of Send Request_Find of Client_DD GE Client Index.2

You can also use:
Send Request_Find of Client_DD GE Client.FileNumber 2 ("Client.FileNumber"
is replaced by the integer 3 at compile). This (to me) is clearer.

So - maybe try the file # & leave off the "Index." ? The "of Client_DD"
part is not always necessary, but it makes the code clearer to me.

An easier (& from what I see in this NG, better) way is to send the
Request_Find to a DEO:

Send Request_Find of odbFormClient_Name GE

This can be done without the file# & index 'cause the DEO already knows the
File & Field & can therefore figure out the correct index. Also (& I'm hazy
on the details) this NG has lead me to understand that more validation is
done this way.

Request_Find vs. Find: There are 2 ways you'll see it used:

Old fashioned code:
Open Client
Find GT Client by Index.1
etc...

And in Sending to a DD (this comes from Help on "Find"):

"This is identical to Request_Find with the exception that a file number
does not need to be passed. In fact, the find message sends Request_Find to
perform its task. This message was provided to provide an easier way for
developers find records. This will be used by batch processes to find
records within a DD."

This (IMHO;-) is an example of DAW trying to "make it easier" for
programmers & instead confusing the issue. I make myself always use the
Request_Find so it's (to my little brain when I come back to look at the
code later) clearer as to what I was doing. It also makes it (once again -
to my little brain) balance better with Request_Save, Request_Delete, etc.
Remembering that one of these operations is different is _way_ to much for
me....

Also - if you don't explicitly send Find to a DD & you have multiple DD's it
won't work. I think this command was intended for use when there is only
one DD being used.

HTH

Garret

"Joe Coley" <sjoec@charter.net> wrote in message
news:1nk%23CX4CFHA.1952@dacmail.dataaccess.com...
> RE: It's in the Help -- Yes, it is in the help, but if you don't
> understand
> the help, it doesn't help! Examples are key (at least for me) to the help
> being "helpful", and I got my examples here from the group, not the help
> in
> this case. In the case of my problem in this thread, issuing the command
> "send find of Inventry_dd GE index.1" as per Ian's suggestion is the only
> thing that seems to work -- and I don't understand why it works either.
> If
> I understand the help correctly it is looking for 3 arguments, each an
> integer. Does "Inventry_dd", "GE", and "index.1" somehow magically get
> converted to integers because each looks more like a string to me :-).
>
> I've tried many variations for a "Send Request_Find ..." -- all with the
> result of no record being found (and it IS there to be found). This
> experience brings up another question -- how does one know when to just
> "find", and when to "request_find"? ...also, why in this case might a
> "request_find" not be appropriate? ((So many questions, so little time to
> understand :-)"))
>
> I am now experiencing a problem with displaying the results of my "send
> find
> of Inventry_dd GE index.1" command, and again it points to somehow not
> passing correct arguments, or arguments correctly. I will post my
> "display
> problem" as the start of a new thread if I can't figure it out.
>
>
> "Dennis Piccioni" <dennis-p@dataaccess.com> wrote in message
> news:lrfOTnHCFHA.4548@dacmail.dataaccess.com...
> Hi Joe,
>
> these arguments are documented in the Class Reference. Just type
> Request_Find into the help index and you will see it pop up a list of
> all classes in which it is found. All arguments are documented in all of
> the classes.
>
> Regards,
> Dennis
>
> Dennis Piccioni
> Data Access Worldwide
> http://www.DataAccess.com/support
>
>
> -----Original Message-----
> From: Joe Coley [mailto:sjoec@charter.net]
> Posted At: Tuesday, February 01, 2005 12:15 AM
> Posted To: visual-dataflex
> Conversation: Find Question
> Subject: Find Question
>
>
> I have the following code for where I want to do a "find GE" of the
> Inventry_DD <snip>
> Send Request_Clear to Inventry_DD
> Move sValue to Inventry.Location
> Move Product.Product_id to Inventry.Product_id
> Send Request_Find to Inventry_DD
>
> <snip>
> My Request_Find creates an error message, and I've determined that I am
> not giving it the arguments that it is expecting. How do I determine
> the values of the arguments that the request find is looking for? (i.e.
> Integer eFindMode Integer iFile integer iIndex )
>
>
>