diff --git a/wizards/source/sfdatabases/SF_Database.xba b/wizards/source/sfdatabases/SF_Database.xba index fa5d0778b873..ff0eafc5b783 100644 --- a/wizards/source/sfdatabases/SF_Database.xba +++ b/wizards/source/sfdatabases/SF_Database.xba @@ -28,7 +28,7 @@ Option Explicit ''' Transaction handling ''' Changes to data remain reversible until the moment the running script instructs the database to commit them. ''' The implicit (default) behaviour is that commit takes place after the execution of every single SQL statement. -''' The choice can be made (SetTranactionMode()) to take commitments manually. +''' The choice can be made (SetTransactionMode()) to take commitments manually. ''' The Commit() and Rollback() statements delimit transactions. ''' ''' Service invocation and usage: diff --git a/wizards/source/sfdatabases/SF_Dataset.xba b/wizards/source/sfdatabases/SF_Dataset.xba index e9eb050d93f0..02b3d35affd9 100644 --- a/wizards/source/sfdatabases/SF_Dataset.xba +++ b/wizards/source/sfdatabases/SF_Dataset.xba @@ -585,6 +585,7 @@ Check: If Not ScriptForge.SF_Utils._Validate(Header, "Header", ScriptForge.V_BOOLEAN) Then GoTo Finally If Not ScriptForge.SF_Utils._Validate(MaxRows, "MaxRows", ScriptForge.V_NUMERIC) Then GoTo Finally End If + If MaxRows < 0 Then MaxRows = 1 Try: With _RowSet @@ -608,7 +609,7 @@ Try: End If ' Load data - Do While bRead And (MaxRows = 0 Or lRows < MaxRows - 1) + Do While bRead lRows = lRows + 1 If lRows = 0 Then ReDim vResult(0 To lRows, 0 To lCols) @@ -618,7 +619,7 @@ Try: For i = 0 To lCols vResult(lRows, i) = _ParentDatabase._GetColumnValue(_RowSet, i + 1) Next i - bRead = .next() + If MaxRows = 0 Or lRows < MaxRows - 1 Then bRead = .next() Else bRead = False Loop Else @@ -1343,7 +1344,7 @@ Try: ' Field names sFields = sFields & "," & .Name ' Updatable field names - If Not _ReadOnly And .isDefinitelyWritable And Not .IsAutoIncrement Then sUpdatableFields = sUpdatableFields & "," & .Name + If Not _ReadOnly And .IsWritable And Not .IsAutoIncrement Then sUpdatableFields = sUpdatableFields & "," & .Name ' Default values _DefaultValues(i) = _ConvertDefaultValue(oColumn) ' AutoValue