ATOUTFOX
COMMUNAUTÉ FRANCOPHONE DES PROFESSIONNELS FOXPRO
Visual FoxPro : le développement durable

Forum AtoutFox : Mettre à jour une table parados sous VFP 9   

Sujet

rss Flux RSS des derniers messages

Vous devez vous identifier pour pouvoir poser une question ou répondre.

lun. 09 décembre 2013, 18h03

MILCENT Bernhart
Belgique Belgique

atoutfox.public.association

Mettre à jour une table parados sous VFP 9

Bonjour tout le monde,


J'esaie en vain depuis longtemps de mettre à jours une table Paradox( Borland )*.DB sous l'environnement VFP 9.
La table log2.db se trouve ici
https://www.dropbox.com/s/bsolq0ojkxd0ko7/LOG2.zip
LE BDE est bien installé sur l'ordinateur et on peut facilement modifier les champs par le programme DBviewer
en dehors de VFP


Sous vfp 9

le code est ici :
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


  cFolderData  = "log2"

  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. maid la table nest pas modifiée

ou se site le problème ?

Bernhart

Permalink : http://www.atoutfox.org/nntp.asp?ID=0000013343
20 286 messages dans le forum • Liste complète des messages

www.atoutfox.org - Site de la Communauté Francophone des Professionnels FoxPro - v3.4.0 - © 2004-2026.
Cette page est générée par un composant COM+ développé en Visual FoxPro 9.0-SP2-HF3