Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 6 Jahren, 12 Monaten
Letzter Beitrag:
vor 6 Jahren, 12 Monaten
Beteiligte Autoren:
Paul Murray, issah, Al

Update or Insert or Delete (All three?)

Startbeitrag von Paul Murray am 22.11.2010 23:54

Greetings all,

Not to be annoying, but in the past I used this thing called a datawindow. You add and delete and modify rows and when you are done, you call update and it automatically figures out if the rows have changed or if they are new or if they have been deleted and it automatically generates all of the sql (delete where, insert and update where) and executes it.

Is any functionality built into the tables here that does that?

Or would I create three queries (INSERT, UPDATE, DELETE)

Hopefully, I am making this more difficult than it appears.

Thanks for the input!!

Paul

Antworten:

P.S. this is for WebDev 15.

Also, I tried HAdd using this code....


ScreenToFile()
HAdd(TABLE_QRY_Affiliate_Supported_SubRegions_By_AffiliateID)
IF HErrorDuplicates() THEN
Error("This record already exists")
END


...but I get this error:

Error at line 30 of Click of BTN_Button3 ( CELL_MDL_Main ) (server) process.
HAdd function called.
file unknown in analysis, or query or view not initialized.
If it is a query, the execution of this query may have failed.

----- Technical Information -----

Project : AffiliatePortal

WL call:
Process of 'Click of BTN_Button3 ( CELL_MDL_Main ) (server)' (PAGE_Affiliate_Territory_Mgmt.CELL_MDL_Container.CELL_MDL_Main.TAB_Tab1.BTN_Button3), line 30, thread 0
'HAdd' function, syntax 1

What happened?
file unknown in analysis, or query or view not initialized.
If it is a query, the execution of this query may have failed.

Error code: 70018
Level: fatal error (EL_FATAL)
WD55 error code: 18

Dump of the error of 'WD150HF.DLL' module (15.00Hw).
Identifier of detailed information (.err): 70116
Debugging information:
IEWDHF=1.1
Module=
Version=
Fonction (7,0)
Additional Information:
EIT_PATHWDD :
EIT_LOGICALTABLENAME :
EIT_PILEWL :
Click of BTN_Button3 ( CELL_MDL_Main ) (server) (PAGE_Affiliate_Territory_Mgmt.CELL_MDL_Container.CELL_MDL_Main.TAB_Tab1.BTN_Button3), line 30
EIT_DATEHEURE : 22/11/2010 19:18:35

Help


The 'table' is definately in the Analysis. The query that is used to intitially load the table is not (it is in the project explorer).

Thanks!!

Paul

von Paul Murray - am 23.11.2010 00:21
Hello Paul

Windev database files are "Files" not "Tables". Discussions in Windev that refer to tables mean a grid structure displayed on the screen. This table may be connected to a file - a browsing table or disconnected - a memory table. This is a simplistic definition as there are other combinations

The "H" prefixed commands exclusivley deal with Windev (H)yper files, the name given to the .fic files that contain the data.

This is why you are getting an error when you attempt the HAdd() into a table which is not a file.

Regards
Al


von Al - am 23.11.2010 00:55
Ahh...Thank you Al (for you thoughtful help),

I purchased the Native SQL Client from WinDev. Would installing all me to use H commands?

Thank you,

Paul

von Paul Murray - am 23.11.2010 01:49
All the native drivers allow you to use the "h" commands on your files (not tables) so that as much as possible, your external database access routines will be similar to your HF experience (native). But please read the small print, terms and conditions apply, especially with record locking, transactions etc.

issah

von issah - am 23.11.2010 08:38
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.