2
0
Эх сурвалжийг харах

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

git-svn-id: trunk@23120 -

lacak 13 жил өмнө
parent
commit
fb3a6f9054

+ 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);