Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update - SQL (Error 1806)
Message
De
24/07/2001 00:03:25
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Update - SQL (Error 1806)
Divers
Thread ID:
00534232
Message ID:
00534232
Vues:
54
Hi all,

I get this error when I try to use WITH-ENDWITH in an Update-SQL command.
SQL: Column "field | variable" is not found (Error 1806), the field or variable you specified cannot be found.
To reproduce the error:
create cursor test (fld1 c(10), fld2 c(10), fld3 i)
x=createobject('doTest')
with x
  .xfld1 = 'Hello'
  .xfld2 = 'World'
  .xfld3 = 1
  *-- work fine
  insert into test values (.xfld1, .xfld2, .xfld3)
  browse
  *-- no problem here
  m.fld1 = .xfld1
  m.fld2 = .xfld2
  m.fld3 = .xfld3
  update test set fld1 = m.fld1, fld2 = m.fld2, fld3 = m.fld3 where fld3 = 1
  browse
  *-- explicitly including the object prefix; still no problem here!
  update test set fld1 = x.xfld1, fld2 = x.xfld2, fld3 = x.xfld3 where fld3 = 1
  browse
  *-- now, using the .property inside the WITH-ENDWITH construct. Error 1806!
  update test set fld1 = .xfld1, fld2 = .xfld2, fld3 = .xfld3 where fld3 = 1
  browse
endwith

define class doTest as session
  xfld1 = ''
  xfld2 = ''
  xfld3 = 0
enddefine
Does anyone know of this problem? I can't find an entry in the Apr 2001 MSDN DVD using keywords: VFP AND Update AND SQL or Foxpro AND Update AND SQL.
ramil
~~ learning to stand still
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform