Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update a paradox Table Is not possible
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Update a paradox Table Is not possible
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01589535
Message ID:
01589535
Vues:
81
hi all ,

i try to update a paradox table ( log2.db in attachment ) with this code...
https://www.dropbox.com/s/bsolq0ojkxd0ko7/LOG2.zip


i want update only the field 'motif'
FUNCTION test262()
* 
* http://sqlpro.developpez.com/cours/sqlaz/fonctions/

  SET SAFETY OFF

  LOCAL cBobDataString,;
    cStringConnection,;
    cfiledata

  SET ENGINEBEHAVIOR 90

  m.cfiledata = "C:\cdbk90\amline\data1\"
  USE (  m.cfiledata + "AMLINE!Id") IN 0



  SET DATABASE TO Amline

  SET SAFETY OFF

  cBobDataString = "C:\Program Files\Megacom_Telecom\EasyCall\data"

  cStringConnection = ["DBQ=] + cBobDataString + [;Driver={Microsoft Paradox Driver ;
(*.db )};DriverId=538;Fil=Paradox ;
5.X;DefaultDir=]+ cBobDataString + [;CollatingSequence=ASCII"]

  CREATE CONNECTION AmlineBobConnection CONNSTRING &cStringConnection

  DBSETPROP('AMLINEBOBCONNECTION', 'Connection', 'Asynchronous', .F.)
  DBSETPROP('AMLINEBOBCONNECTION', 'Connection', 'BatchMode', .T.)
  DBSETPROP('AMLINEBOBCONNECTION', 'Connection', 'Comment', '')
  DBSETPROP('AMLINEBOBCONNECTION', 'Connection', 'DispLogin', 1)
  DBSETPROP('AMLINEBOBCONNECTION', 'Connection', 'ConnectTimeOut', 15)
  DBSETPROP('AMLINEBOBCONNECTION', 'Connection', 'DispWarnings', .F.)
  DBSETPROP('AMLINEBOBCONNECTION', 'Connection', 'IdleTimeOut', 0)
  DBSETPROP('AMLINEBOBCONNECTION', 'Connection', 'QueryTimeOut', 0)
  DBSETPROP('AMLINEBOBCONNECTION', 'Connection', 'Transactions', 1)
  DBSETPROP('AMLINEBOBCONNECTION', 'Connection', 'Database', '')



  * création Vue distante
  LOCAL cFolderData

  *-- La vue doit pointer sur jjjj + 'compan'
  cFolderData  = "log2" && cDossierJn + 'KH' + ALLTRIM( PROPER( Compagny.cJnAcBob ) )

  EXECSCRIPT("CREATE SQL VIEW v_taxation REMOTE CONNECT 'AmlineBobConnection' AS SELECT * FROM "  + cFolderData  +;
    " where local = '29' " )

  DBSETPROP('v_taxation', 'View', 'UpdateType', 2)
  DBSETPROP('v_taxation', 'View', 'WhereType', 3)
  DBSETPROP('v_taxation', 'View', 'FetchMemo', .T.)
  DBSETPROP('v_taxation', 'View', 'SendUpdates', .T.)
  DBSETPROP('v_taxation', 'View', 'UseMemoSize', 255)
  DBSETPROP('v_taxation', 'View', 'FetchSize', 100)
  DBSETPROP('v_taxation', 'View', 'MaxRecords', -1)
  DBSETPROP('v_taxation', 'View', 'Tables', cFolderData )
  DBSETPROP('v_taxation', 'View', 'Prepared', .F.)
  DBSETPROP('v_taxation', 'View', 'CompareMemo', .T.)
  DBSETPROP('v_taxation', 'View', 'FetchAsNeeded', .F.)
  DBSETPROP('v_taxation', 'View', 'Comment', "")
  DBSETPROP('v_taxation', 'View', 'BatchUpdateCount', 1)
  DBSETPROP('v_taxation', 'View', 'ShareConnection', .F.)


* Props for the v_taxationhappel field.
DBSETPROP('v_taxation.happel', 'Field', 'KeyField', .T.)
DBSETPROP('v_taxation.happel', 'Field', 'Updatable', .T.)
DBSETPROP('v_taxation.happel', 'Field', 'UpdateName', 'happel')
DBSETPROP('v_taxation.happel', 'Field', 'Caption', "happel")
DBSETPROP('v_taxation.happel', 'Field', 'DataType', "T")
DBSETPROP('v_taxation.happel', 'Field', 'DefaultValue', "")

DBSETPROP('v_taxation.motif', 'Field', 'KeyField', .F.)
DBSETPROP('v_taxation.motif', 'Field', 'Updatable', .T.)
DBSETPROP('v_taxation.motif', 'Field', 'UpdateName', 'motif')
DBSETPROP('v_taxation.motif', 'Field', 'Caption', 'motif')
DBSETPROP('v_taxation.motif', 'Field', 'DataType', 'C(20)')
DBSETPROP('v_taxation.motif', 'Field', 'DefaultValue', '')


  SET SAFETY ON
USE IN 0 v_taxation
SELECT v_taxation
=REQUERY()
GO bottom

REPLACE ALL motif WITH TRANSFORM( RECNO() )
IF TABLEUPDATE(.T. , .T. )


WAIT WINDOW "OK"

ENDIF

set
 BROWSE

ENDFUNC
=tableupdate return .T. but the table is NOT updated ?

Where is the problem ?

Bernhart
Répondre
Fil
Voir

Click here to load this message in the networking platform