Browse Source

fcl-db: odbc: map 'call' to stExecProcedure.
(revealed by test TestOpenStoredProc for MySQL ODBC)

git-svn-id: trunk@23120 -

lacak 12 years ago
parent
commit
fb3a6f9054
1 changed files with 8 additions and 4 deletions
  1. 8 4
      packages/fcl-db/src/sqldb/odbc/odbcconn.pas

+ 8 - 4
packages/fcl-db/src/sqldb/odbc/odbcconn.pas

@@ -303,10 +303,14 @@ end;
 
 function TODBCConnection.StrToStatementType(s : string) : TStatementType;
 begin
-  S:=Lowercase(s);
-  if s = 'transform' then Result:=stSelect //MS Access
-  else if s = 'exec' then Result:=stExecProcedure
-  else Result := inherited StrToStatementType(s);
+  case Lowercase(s) of
+    'transform': // MS Access
+      Result := stSelect;
+    'exec', 'call':
+      Result := stExecProcedure;
+    else
+      Result := inherited StrToStatementType(s);
+  end;
 end;
 
 procedure TODBCConnection.SetParameters(ODBCCursor: TODBCCursor; AParams: TParams);