mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 21:40:34 +02:00
* sqlhandle type changed to pointer. Fixed demo.
git-svn-id: trunk@8876 -
This commit is contained in:
parent
053540e89e
commit
8d215c8ada
@ -33,11 +33,11 @@ Var
|
|||||||
Procedure FreeHandles;
|
Procedure FreeHandles;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
If StmtHAndle<>0 then
|
If assigned(StmtHAndle) then
|
||||||
SQLFreeHandle(SQL_HANDLE_STMT,StmtHandle);
|
SQLFreeHandle(SQL_HANDLE_STMT,StmtHandle);
|
||||||
If DBHandle<>0 then
|
If assigned(dbhandle) then
|
||||||
SQLFreeHandle(SQL_HANDLE_DBC,DBHandle);
|
SQLFreeHandle(SQL_HANDLE_DBC,DBHandle);
|
||||||
If EnvHandle<>0 then
|
If assigned(EnvHandle) then
|
||||||
SQLFreeHandle(SQL_HANDLE_ENV,EnvHandle);
|
SQLFreeHandle(SQL_HANDLE_ENV,EnvHandle);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -55,9 +55,9 @@ Var
|
|||||||
Res : Integer;
|
Res : Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
EnvHandle:=0;
|
EnvHandle:=nil;
|
||||||
DBHandle:=0;
|
DBHandle:=nil;
|
||||||
StmtHandle:=0;
|
StmtHandle:=nil;
|
||||||
Res:=SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, EnvHandle);
|
Res:=SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, EnvHandle);
|
||||||
if Res <> SQL_SUCCESS then
|
if Res <> SQL_SUCCESS then
|
||||||
DoError('Could allocate ODBC handle',Res);
|
DoError('Could allocate ODBC handle',Res);
|
||||||
|
Loading…
Reference in New Issue
Block a user