V4RB: VException??

Claudius Sailer claudius.sailer at me.com
Mon May 3 15:29:10 CDT 2010


Hello,

I have following Code


  SQLString="SELECT RecID,Online FROM Currencies"
  CurEx=V4RBSQLSelect(tmpDB,SQLString)
  Ende=CurEx.RecordCount
  
  //Links korrigieren in Currencies
  cmd="ALTER TABLE Currencies MODIFY COLUMN Online OBJECTPTR CONSTRAINT Currencies_Online__Online REFERENCES Online ON DELETE RESTRICT"
  count=V4RBSQLExecute(tmpDB,cmd)
  
  for i=1 to Ende
    CurEx.Position=i
    cmd="UPDATE Currencies SET Online=" + CurEx.stringfield("Online").getstring + "where RecID=" + CurEx.stringfield("RecID").getstring
    MsgBox cmd
    count=V4RBSQLExecute(tmpDB,cmd)
  next


for fixing a problem with my Links. After ALTER TABLE all ObjectPtr-fields have value 0. So I want to rewrite the old values to the table.
But on the line
CurEx.Position=i I ge tan VExeption. Does anybody knows why?
Are Cursors destroyed by ALTER TABLE command?

thanks



Claudius

-- 
iMac CD 2GHz / MacOS X 10.6.2de / RB 2010r1/ Valentina 4.6
Homepage    http://www.ClaSai.de
iChat        ryhoruk
RealBasic ListBoxes: [ I feel the need...the need for speed!!! ]









More information about the Valentina mailing list