Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating through SPT
Message
From
08/08/2003 09:53:09
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00818150
Message ID:
00818195
Views:
19
There check aerror. Reason might be very different. ie:
IF !TABLEUPDATE(0,.f.,"NominaPopular")
lcError=''
Aerror(arrCheck)
For ix=1 to 7
  lcError = lcError+trans( arrCheck [ix])+ chr(13)
Endfor
Messagebox(lcError,0,'Error def.')
	WAIT WINDOW "NO SE pudo Actualiza La Tabla 1"
	SQLROLLBACK(Thisform.Connhandle)
	RETURN 0
ELSE
Cetin


>I meant the message my program show if the remote table can't be updated.
>
>
>IF !TABLEUPDATE(0,.f.,"NominaPopular")
>	WAIT WINDOW "NO SE pudo Actualiza La Tabla 1"
>	SQLROLLBACK(Thisform.Connhandle)
>	RETURN 0
>ELSE
>
>
>
>>Error ? What error ?
>>Cetin
>>
>>>I added the UpdateNameList property but still having the same error message. I also set the WhereType property to 3.
>>>
>>>
>>>CURSORSETPROP("UpdateNameList",;
>>>		"fldCodigoEmpleado tbNomina.fldCodigoEmpleado,;
>>>			fldNumeroCta tbNomina.fldNumeroCta,;
>>>			fldMonto tbNomina.fldMonto,;
>>>			fldTipoRegistro tbNomina.fldTipoRegistro,;
>>>			fldNombreEmp tbNomina.fldNombreEmp",;
>>>			cNombreCursor)
>>>CURSORSETPROP("WhereType",3,cNombreCursor)				
>>>
>>>
>>>Enmanuel
>>>>
>>>>You're missing UpdateNameList as I could see at first glance. ie:
>>>>
>>>>
>>>>SQLExec(lnHandle,'select * from dbo.authors','v_authors')
>>>>CursorSetProp('KeyFieldList','au_id','v_authors')
>>>>CursorSetProp('WhereType',1,'v_authors')
>>>>CursorSetProp('Tables','authors','v_authors')
>>>>
>>>>CursorSetProp("UpdateNameList", ;
>>>>  "au_id    authors.au_id,"+;
>>>>  "au_lname authors.au_lname,"+;
>>>>  "au_fname authors.au_fname,"+;
>>>>  "contract authors.contract",'V_authors')
>>>>
>>>>CursorSetProp('UpdatableFieldList','au_fname,au_lname,contract','v_authors')
>>>>CursorSetProp('SendUpdates',.T.,'v_authors')
>>>>CursorSetProp('Buffering',5,'v_authors')
>>>>
In updatenamelist fields appear in pairs, on the left is your fieldname and on the right basetable's fieldname. ie:
>>>>
>>>>
>>>>SQLExec(lnHandle,'select FirstName as Fname, LastName as Lname'+;
>>>>' from ServerTable...', 'v_myview)
>>>>
>>>>CursorSetProp("UpdateNameList", ;
>>>>  "Fname ServerTable.FirstName,"+;
>>>>  "Lname ServerTable.LastName",'V_myView')
>>>>
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform