Source Code For "Using the PFC DataWindow for Updates Part @2"
Volume 7, Issue 4 p.35

	

Listing 1 

// Profile EAS Demo DB V3 SQLCA.DBMS = "ODBC" SQLCA.Database = "EAS Demo DB V3" SQLCA.AutoCommit = False SQLCA.DBParm = "ConnectString='DSN=EAS Demo DB V3;UID=dba;PWD=sql'" connect using SQLCA; If SQLCA.SQLDBCode <> 0 Then messagebox("Error","Cannot connect to database!") HALT CLOSE End If dw_1.of_SetTransObject(SQLCA) dw_1.Retrieve() // Preupdate stuff int li_i int li_rows li_rows = dw_1.RowCount() FOR li_i = 1 to li_rows If IsNull(dw_1.GetItemString(li_i,"company_name")) Then messagebox("Error","Company Name Must Be Entered") dw_1.SetFocus() dw_1.SetRow(li_i) dw_1.SetColumn("company_name") Return -1 End If NEXT Return 1