PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → Saving changes in a view
Saving changes in a view
Started by John Marrone, Jun., 24 2005 4:35 PM - 7 replies
Posted on June, 24 2005 - 4:35 PM
Hi All
I have created a view and I make a change to 1 field. But it does not take. Here is my code:
vwEnt is Data Source
HCreateView(vwEnt, Entries, "RaceID,HrsName,PostPosition,PrgNumber", "RaceID", "RaceID]='"+vcRaceID+"'",hViewLocking+hViewExclusive)
// Browse the view
HReadFirst(vwEnt)
WHILE NOT HOut()
// Insert your process here
// Create the view
vwPPL is Data Source
HCreateView(vwPPL, PPLines, "HrsName,Date,RunStyle", "HrsName,-Date", "HrsName='"+vwEnt.HrsName+"'", hViewLocking+hViewExclusive)

// Browse the view
HReadFirst(vwPPL)
WHILE NOT HOut()
// Insert your process here
HReadNext(vwPPL)
END
HDeleteView(vwPPL)
vwEnt.RunStyle = "LL" <--- I change this field
HModify(vwEnt) <-- - I write it to the view
HReadNext(vwEnt)
END
HViewToFile(vwEnt) <--- I save it to the file
HDeleteView(vwEnt)
Can anybody help??
Thanks
John
Posted on June, 24 2005 - 4:57 PM
John,
hViewLocking should do the trick.
Raimund
Hi All
I have created a view and I make a change to 1 field. But it does not take. Here is my code:
vwEnt is Data Source
HCreateView(vwEnt, Entries, "RaceID,HrsName,PostPosition,PrgNumber", "RaceID", "RaceID]='"+vcRaceID+"'",hViewLocking+hViewExclusive)
// Browse the view
HReadFirst(vwEnt)
WHILE NOT HOut()
// Insert your process here
// Create the view
vwPPL is Data Source
HCreateView(vwPPL, PPLines, "HrsName,Date,RunStyle", "HrsName,-Date", "HrsName='"+vwEnt.HrsName+"'", hViewLocking+hViewExclusive)

// Browse the view
HReadFirst(vwPPL)
WHILE NOT HOut()
// Insert your process here
HReadNext(vwPPL)
END
HDeleteView(vwPPL)
vwEnt.RunStyle = "LL" <--- I change this field
HModify(vwEnt) <-- - I write it to the view
HReadNext(vwEnt)
END
HViewToFile(vwEnt) <--- I save it to the file
HDeleteView(vwEnt)
Can anybody help??
Thanks
John



http://www.invitec.com
Posted on June, 24 2005 - 4:59 PM
John,
hViewLocking should do the trick.
Raimund
Hi All
I have created a view and I make a change to 1 field. But it does not take. Here is my code:
vwEnt is Data Source
HCreateView(vwEnt, Entries, "RaceID,HrsName,PostPosition,PrgNumber", "RaceID", "RaceID]='"+vcRaceID+"'",hViewLocking+hViewExclusive)
// Browse the view
HReadFirst(vwEnt)
WHILE NOT HOut()
// Insert your process here
// Create the view
vwPPL is Data Source
HCreateView(vwPPL, PPLines, "HrsName,Date,RunStyle", "HrsName,-Date", "HrsName='"+vwEnt.HrsName+"'", hViewLocking+hViewExclusive)

// Browse the view
HReadFirst(vwPPL)
WHILE NOT HOut()
// Insert your process here
HReadNext(vwPPL)
END
HDeleteView(vwPPL)
vwEnt.RunStyle = "LL" <--- I change this field
HModify(vwEnt) <-- - I write it to the view
HReadNext(vwEnt)
END
HViewToFile(vwEnt) <--- I save it to the file
HDeleteView(vwEnt)
Can anybody help??
Thanks
John



http://www.invitec.com
Posted on June, 24 2005 - 5:19 PM
I am already doing that.
>HCreateView(vwEnt, Entries, "RaceID,HrsName,PostPosition,PrgNumber", "RaceID", "RaceID]='"+vcRaceID+"'",hViewLocking+hViewExclusive) <----
Any other ideals. Thanks Raimund
John

John,
hViewLocking should do the trick.
Raimund
Hi All
I have created a view and I make a change to 1 field. But it does not take. Here is my code:
vwEnt is Data Source
HCreateView(vwEnt, Entries, "RaceID,HrsName,PostPosition,PrgNumber", "RaceID", "RaceID]='"+vcRaceID+"'",hViewLocking+hViewExclusive)
// Browse the view
HReadFirst(vwEnt)
WHILE NOT HOut()
// Insert your process here
// Create the view
vwPPL is Data Source
HCreateView(vwPPL, PPLines, "HrsName,Date,RunStyle", "HrsName,-Date", "H

rsName='"+vwEnt.HrsName+"'", hViewLocking+hViewExclusive)

// Browse the view
HReadFirst(vwPPL)
WHILE NOT HOut()
// Insert your process here
HReadNext(vwPPL)
END
HDeleteView(vwPPL)
vwEnt.RunStyle = "LL" <--- I change this field
HModify(vwEnt) <-- - I write it to the view
HReadNext(vwEnt)
END
HViewToFile(vwEnt) <--- I save it to the file
HDeleteView(vwEnt)
Can anybody help??
Thanks
John
Posted on June, 24 2005 - 5:23 PM
G'day John
I haven't got a solution but as a starting point it would be useful to test the returns from the hmodify and the Hviewtofile to see exactly where the error is, because at this stage we don't know if the data is actually getting into the view to then be written to the file.
Regards
Al
Posted on June, 24 2005 - 5:51 PM
G'day John
I haven't got a solution but as a starting point it would be useful to test the returns from the hmodify and the Hviewtofile to see exactly where the error is, because at this stage we don't know if the data is actually getting into the view to then be written to the file.
Regards
Al

Hi Al
After the HModify(vwEnt) the value of vwEnt.RunStyle is "LL" like it should be. So the HViewToFile(vwEnt) is where it is failing. How do you debug that???
John
Posted on June, 24 2005 - 6:00 PM
Hi Guys
I did not have RunStyle as part of my view when I created the view. I don't know why WD did not error when i wrote vwEnt.RunStyle = "LL". You woukd of thought I would of got an error. O well thanks for the help. I am due for my 2nd cup of coffee any minute now, then I should be fully awake.
John
Hi All
I have created a view and I make a change to 1 field. But it does not take. Here is my code:
vwEnt is Data Source
HCreateView(vwEnt, Entries, "RaceID,HrsName,PostPosition,PrgNumber", "RaceID", "RaceID]='"+vcRaceID+"'",hViewLocking+hViewExclusive)
// Browse the view
HReadFirst(vwEnt)
WHILE NOT HOut()
// Insert your process here
// Create the view
vwPPL is Data Source
HCreateView(vwPPL, PPLines, "HrsName,Date,RunStyle", "HrsName,-Date", "HrsName='"+vwEnt.HrsName+"'", hViewLocking+hViewExclusive)

// Browse the view
HReadFirst(vwPPL)
WHILE NOT HOut()
// Insert your process here
HReadNext(vwPPL)
END
HDeleteView(vwPPL)
vwEnt.RunStyle = "LL" <--- I change this field
HModify(vwEnt) <-- - I write it to the view
HReadNext(vwEnt)
END
HViewToFile(vwEnt) <--- I save it to the file
HDeleteView(vwEnt)
Can anybody help??
Thanks
John
Posted on June, 24 2005 - 7:01 PM
That's what a lot of developers, included me, needs : a pot of coffee and a supporting forum like this.
Regards,
Teun.