Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating remote views
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Updating remote views
Divers
Thread ID:
00133969
Message ID:
00133969
Vues:
48
Hi All,

I have a problem updating remote views. Here is some code to reproduce my problem. I create a Remote view (tmpView) on a Free foxpro table (tmpTable) through a Foxpro ODBC datasource (tmpconnection)

CREATE DATABASE tmpDBC
CREATE SQL VIEW tmpView REMOTE CONNECTION 'tmpConnection' ;
AS SELECT * FROM tmpTable

USE tmpView
lnFields = AFIELDS(laFields)
FOR lnTeller = 1 TO lnFields
lcField = 'tmpView.' + laFields[lnTeller,1]
IF laFields[lnTeller, 2] $ 'DT'
*!* Empty data(time) fields result in {30-12-1899}
*!* instead of empty fields, so replace
REPLACE ALL (laFields[lnTeller,1]) WITH { } ;
FOR EVAL(laFields[lnTeller,1]) = {30-12-1899}
ENDIF
IF PCOUNT() > 1 AND laFields[lnTeller,1] $ UPPER(tcIndex)
DBSETPROP(lcField, 'Field', 'KeyField', .T.)
ENDIF
ENDFOR

FOR lnTeller = 1 TO lnFields
lcField = 'tmpView.' + laFields[lnTeller,1]
DBSETPROP(lcField, 'Field', 'Updatable', .T.)
ENDFOR
DBSETPROP('tmpView', 'View', 'SendUpdates', .T.)
CURSORSETPROP('Buffering', 5, 'tmpView')

When I change something in this view an do an TABLEUPDATE() nothing changes in the original table. My tmpTable is in my c:\temp directory and the tmpConnection DSN points to that directory. Now I do the following:

REPLACE ALL nRecID WITH RECNO()
TABLEUPDATE(0, .T., 'tmpView')
CLEAR ALL
USE C:\TEMP\tmpTable
BROWSE

While TABLEUPDATE did return .T. the original table still shows the old values. What could be wrong here?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform