S = VBO.VFld.Getstring() ?

Barney barney at custombased.com
Mon Jul 5 11:34:37 CDT 2004


Hello,

I am just trying to access a fields data using...

BaseObject.Field.Getstring()

Below I am writing to a text file all the data inside a database just so on
Windows I can quickly see what's happening inside.

It writes everything properly except the data. the line...

S = S + Fld.Name + " = " + Fld.GetString() + tb

is not getting the data from the field.

What am I doing wrong here ?

Thank you.

Barney




  Dim BO as VBaseObject
  Dim Fld as VField
  Dim I,Z,BOCount,FieldCount as Integer
  Dim S,T as string
  Dim BR,Tb as String
  Dim D as Date
  Dim F as Folderitem
  Dim TOut as TextOutputStream
  
  
  #If TargetWin32 then
    BR = chr(13) + chr(10)
  #Else
    BR = chr(13)
  #Endif
  
  D = New Date
  Tb = chr(9)
  
  S = "Examination of database " + D.LongDate + " : " + D.LongTime + "|||"
  
  
  For BOCount = 1 to App.DB.BaseObjectsCount
    
    BO = App.DB.BaseObject(BOCount)
    S = S + "Base Object " + str(BOCount) + "Name : " + BO.Name + "||"
    
    For Z = 1 to BO.RecordCount
      For FieldCount = 1 to BO.FieldCount
        Fld = BO.field(FieldCount)
        S = S + Fld.Name + " = " + Fld.GetString() + tb
      Next
      S = S + "|"
    Next
    
    S = S + "|||"
    
  Next
  
  S = ReplaceAll(S,"|",BR)
  
  F = GetFolderItem("Database Data.txt")
  TOut = F.CreateTextFile
  TOut.Write S



More information about the Valentina mailing list