ich habe von v8.3 auf v9.1 umgestellt.
gute Nachricht : DbfUpSize.EXE sowie PGu.EXE laufen
aber ich hab ein anderes "Problem" : Die Reihenfolge der Fields ist jetzt "verkehrt rum" ...
Code: Alles auswählen
METHOD PGSql:dbStruct( cTable ) // Edgar
LOCAL aStruct := {}
LOCAL oStruct, i, iMax
LOCAL cField, cType, nLen, nDec
LOCAL cWhere := ""
::exec( "SELECT column_name, data_type, character_maximum_length, numeric_precision, numeric_scale " + ;
"FROM information_schema.columns WHERE table_name='" + cTable + "'" )
oStruct := ::result
iMax := oStruct:rows // add by Jimmy (debug)
FOR i = 1 TO iMax // change by Jimmy
cField := oStruct:GetValue( i - 1, 0 )
cType := UPPER( SUBSTR( oStruct:GetValue( i - 1, 1 ), 1, 1 ) )
DO CASE
CASE cType = "C"
nLen := oStruct:FieldGet( i - 1, 2 )
nDec := 0
CASE cType = "D"
nLen := 10
nDec := 0
CASE cType = "T"
cType := "M"
nLen := oStruct:FieldGet( i - 1, 2 )
nDec := 0
CASE cType = "N"
nLen := oStruct:FieldGet( i - 1, 3 )
nDec := oStruct:FieldGet( i - 1, 4 )
CASE cType = "I" // Jimmy
nLen := oStruct:FieldGet( i - 1, 3 )
nDec := oStruct:FieldGet( i - 1, 4 )
CASE cType = "B" // Jimmy
nLen := 1
nDec := 0
ENDCASE
AADD( aStruct, { cField, cType, nLen, nDec } )
NEXT
RETURN ( aStruct )