PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Save Table details to Data Table
Save Table details to Data Table
Débuté par Ruan, 24 avr. 2014 13:06 - 4 réponses
Membre enregistré
208 messages
Popularité : +1 (1 vote)
Posté le 24 avril 2014 - 13:06
Good Day

I ran into what I believe a very simple issue. I have a table that i fill with the "TABLEADDLINE" procedure. What I cannot figure out is how to "HADD" / "SCREENtoFILE" to my data Table...

What am I missing?

Thanks
Membre enregistré
208 messages
Popularité : +1 (1 vote)
Posté le 24 avril 2014 - 13:17
Ruan wrote:
Good Day

I ran into what I believe a very simple issue. I have a table that i fill with the "TABLEADDLINE" procedure. What I cannot figure out is how to "HADD" / "SCREENtoFILE" to my data Table...

What am I missing?

Thanks


When I do This:

Customer.LastName = LastNameColumn
Customer.FirstName = FirstNameColumn
Customer.Address = AddressColumn
Customer.ZC = ZCColumn
Customer.City = CityColumn
HAdd(Customer)


it works 100%. But why does does:
TableSave(TABLE_Customer)


Not work>

Thanks
Membre enregistré
208 messages
Popularité : +1 (1 vote)
Posté le 24 avril 2014 - 13:20
Ruan wrote:
Ruan wrote:
Good Day

I ran into what I believe a very simple issue. I have a table that i fill with the "TABLEADDLINE" procedure. What I cannot figure out is how to "HADD" / "SCREENtoFILE" to my data Table...

What am I missing?

Thanks


When I do This:



Customer.LastName = LastNameColumn
Customer.FirstName = FirstNameColumn
Customer.Address = AddressColumn
Customer.ZC = ZCColumn
Customer.City = CityColumn
HAdd(Customer)


it works 100%. But why does does:
TableSave(TABLE_Customer)


Not work>

Thanks



Sorry actually it's not working 100%, it only saves the selected item in the Table and not everything in the table
Posté le 24 avril 2014 - 14:03
Hi Ruan

it does work 100%. It is supposed to add ONE record, and it does just that.

Your current problem seems to come from the fact that you do not know or
understand the different types of table:
1- based on a file
2- based on a query
3- filled by code


You are currently in mode 3... In this mode, you fill the table AND do
the saving by code. The table is juts there to SHOW the data.

In mode 1, your table will save any change in the table for you...

In mode 2, IF your query is in EDIT mode (option) and only work on ONE
file (no multifile queries), then the table can also write the edits in
the query and file.

For more information, read the help file about the tables and their
different options

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

NEW: WXShowroom.com is available: Show your projects!
More information on http://www.fabriceharari.com

On 4/24/2014 5:20 AM, Ruan wrote:
Ruan wrote:
Ruan wrote:
Good Day

I ran into what I believe a very simple issue. I have a table that i
fill with the "TABLEADDLINE" procedure. What I cannot figure out is
how to "HADD" / "SCREENtoFILE" to my data Table...

What am I missing?

Thanks


When I do This:


Customer.LastName = LastNameColumn
Customer.FirstName = FirstNameColumn
Customer.Address = AddressColumn
Customer.ZC = ZCColumn
Customer.City = CityColumn
HAdd(Customer)


it works 100%. But why does does:
TableSave(TABLE_Customer)


Not work>

Thanks


Sorry actually it's not working 100%, it only saves the selected item in
the Table and not everything in the table
Membre enregistré
208 messages
Popularité : +1 (1 vote)
Posté le 24 avril 2014 - 15:06
Fabrice Harari wrote:
Hi Ruan

it does work 100%. It is supposed to add ONE record, and it does just that.

Your current problem seems to come from the fact that you do not know or
understand the different types of table:
1- based on a file
2- based on a query
3- filled by code


You are currently in mode 3... In this mode, you fill the table AND do
the saving by code. The table is juts there to SHOW the data.

In mode 1, your table will save any change in the table for you...

In mode 2, IF your query is in EDIT mode (option) and only work on ONE
file (no multifile queries), then the table can also write the edits in
the query and file.

For more information, read the help file about the tables and their
different options

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

NEW: WXShowroom.com is available: Show your projects!
More information on http://www.fabriceharari.com

On 4/24/2014 5:20 AM, Ruan wrote:
Ruan wrote:
Ruan wrote:
Good Day

I ran into what I believe a very simple issue. I have a table that i
fill with the "TABLEADDLINE" procedure. What I cannot figure out is
how to "HADD" / "SCREENtoFILE" to my data Table...

What am I missing?

Thanks


When I do This:


Customer.LastName = LastNameColumn
Customer.FirstName = FirstNameColumn
Customer.Address = AddressColumn
Customer.ZC = ZCColumn
Customer.City = CityColumn
HAdd(Customer)


it works 100%. But why does does:
TableSave(TABLE_Customer)


Not work>

Thanks


Sorry actually it's not working 100%, it only saves the selected item in
the Table and not everything in the table


Hi

I have managed to get it right with this:

nContainer is int = 1

FOR ALL ROW OF TABLE_LOG_CONTAINER_ADD_DETAILS
NEW_PENTACIA_CONTAINERS.CONTRNR = TABLE_LOG_CONTAINER_ADD_DETAILS.COL_Container_Nr
NEW_PENTACIA_CONTAINERS.SHIPDATE = TABLE_LOG_CONTAINER_ADD_DETAILS.COL_Ship_Date
NEW_PENTACIA_CONTAINERS.VESSELNAME = TABLE_LOG_CONTAINER_ADD_DETAILS.COL_Vessel_Name
HAdd(NEW_PENTACIA_CONTAINERS)
nContainer++
END


Still new with this language but getting there fast...WINDEV is the best thing after freshly backed cookies.

Thanks