Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating through SPT
Message
 
To
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:
00818211
Views:
21
Thanks a lot Cetin!!!! The problem was on the tables property. I was using the name of the local cursor in both parameters.

Enmanuel

>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
I'm a mixture of Albert Einstein and Arnold Schwarzenegger. The only trouble is that I got Einstein's body and Schwarzenegger's brain
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform