Browse Source

* RowsAffected should return -1 when there is nu result
* Set Size for ftBCD fields

git-svn-id: trunk@9060 -

joost 18 years ago
parent
commit
a6fdcf870e
1 changed files with 5 additions and 2 deletions
  1. 5 2
      packages/fcl-db/src/sqldb/mysql/mysqlconn.inc

+ 5 - 2
packages/fcl-db/src/sqldb/mysql/mysqlconn.inc

@@ -455,7 +455,7 @@ begin
     FIELD_TYPE_DECIMAL: if ADecimals < 5 then
                           begin
                           NewType := ftBCD;
-                          NewSize := 0;
+                          NewSize := ADecimals;
                           end
                         else
                           begin
@@ -847,7 +847,10 @@ end;
 
 function TConnectionName.RowsAffected(cursor: TSQLCursor): TRowsCount;
 begin
-  Result := (cursor as TCursorName).RowsAffected;
+  if assigned(cursor) then
+    Result := (cursor as TCursorName).RowsAffected
+  else
+    Result := -1;
 end;
 
 constructor TConnectionName.Create(AOwner: TComponent);