Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 3 Jahren
Letzter Beitrag:
vor 3 Jahren
Beteiligte Autoren:
Al, Tor-Bjarne, BASIC, Basic

Basic questions on hfdb

Startbeitrag von Basic am 24.05.2015 23:06

lets say custumer is a data fille with as keys name / adres / group is a duplicate key al keys have text mask.the data fille is filled with the records from below.

---------------------------------------------
>name< / >adres< / >group<
>Alden< / > ? < / > A <
> Taavi < / > ? < / > B <
> Nairi < / > ? < / > B <
> Denzel< / > ? < / > A <
____________________________

lets say i want to display al custumers of group A (in a info popup) how can i do that? i know the functions hreadseekfirst / Hreadnext surely there must be a easy command that shows all records of 1 key ..... Or can i puth Hreadnext...in some sort of loop?if so can you give me a simpel exampe?are there some english youtube turtorials that explain most common functions related handeling data filles with windev?

Antworten:

Hello Basic

Let's say you do some of the basic examples that come with Windev, create a basic window with a table and some basic code and then come back to us if that doesn't work

Regards
Al

von Al - am 24.05.2015 23:17
I can fill a table buth that proces is automated....it is not realy fair to compare both...Besides
the windev tutorial could be a lot better with more exampels building up from basic..i. wright now it is just to littel....most online video tutorials are in French and so ......bydeway did you think i didint turn to the tutorial first before posting???

von BASIC - am 24.05.2015 23:29
Hello Basic

You can set a filter on a file an dthen direct fill a table with the results by binding the table to the file, or you can run a query and the use filetotable or you can use Hreadseek() in a do while loop

Tyr the CRM example or try running the RAD in procedural code. It will build an entry screen and a view table. The code example is not that bad

Regards
Al

von Al - am 25.05.2015 00:03
Hi Basic,

If I where you I would study query as the source of data, and a Equals Parameter on "Group" (and perhaps a contains parameter on Name)

Nice feature of query parameters is that: "If you not set the parameter, it is not taken into account."

In this way you have a query that can sort on a group, and if the pName parameters is set, you get the a customer within that group that matches your pName criteria
.
And if you use only the pName parameter you have a search on customers name.

So one query can have multiple uses in your code.

Your code would then look something like:


//Defined parameter in the query with the query builder
Qry_Customers.pGroup = "A"


if hexecutequery(qry_Customers,hdefault) = True
For each Qry_Customers
//Do something with the data - fill a combo / Popup etc.
Trace(qry_customers.name,qry_customers.group)
End
else
Error("Something went wrong, got error.: "+herrorinfo())
end


With queryes you can display the retrived data before you write a single line of code ;)

Cheers
Tor-Bjarne

von Tor-Bjarne - am 25.05.2015 11:22
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.