Subject | delphi 2009 and query.open (ERROR ACESS VIOLATION) |
---|---|
Author | Valdemir (yahoo) |
Post date | 2009-09-09T15:50:13Z |
pardon my English, I'm using the google translator
When you run the following query
SELECT TIPO
FROM LOGRADOURO
WHERE UPPER(TIPO) <> 'OUTRO'
ORDER BY TIPO
using Delphi 2009 and IBO 4.9.5
of an access error violation
by debug I saw that the function
function TIBODataSet.GetBookmark: TBookmark;
var
B: AnsiString;
begin
B := GetBookmarkStr;
Result := nil;
if B <> '' then
begin
Result := AllocMem( BookmarkSize );
{$IFDEF IBO_VCL2009_OR_GREATER}
Move( pointer( B )^, Result[0], BookmarkSize );
{$ELSE}
Move( pointer( B )^, Result^, BookmarkSize );
{$ENDIF}
end;
end;
more specifically the line
Move( pointer( B )^, Result[0], BookmarkSize );
the error when I open the query command
qryLogradouro.Open;
if I open the query command within the delphi not including the error I see, the error
only appears when I run the program
this error is giving in all my paintings .. independent of the query I sent this to be
one of the simplest
the table structure in the path is
CREATE TABLE LOGRADOURO (
ID INTEGER NOT NULL,
TIPO VARCHAR(20) COLLATE WIN_PTBR
);
ALTER TABLE LOGRADOURO ADD CONSTRAINT PK_LOGRADOURO PRIMARY KEY (ID);
[Non-text portions of this message have been removed]
When you run the following query
SELECT TIPO
FROM LOGRADOURO
WHERE UPPER(TIPO) <> 'OUTRO'
ORDER BY TIPO
using Delphi 2009 and IBO 4.9.5
of an access error violation
by debug I saw that the function
function TIBODataSet.GetBookmark: TBookmark;
var
B: AnsiString;
begin
B := GetBookmarkStr;
Result := nil;
if B <> '' then
begin
Result := AllocMem( BookmarkSize );
{$IFDEF IBO_VCL2009_OR_GREATER}
Move( pointer( B )^, Result[0], BookmarkSize );
{$ELSE}
Move( pointer( B )^, Result^, BookmarkSize );
{$ENDIF}
end;
end;
more specifically the line
Move( pointer( B )^, Result[0], BookmarkSize );
the error when I open the query command
qryLogradouro.Open;
if I open the query command within the delphi not including the error I see, the error
only appears when I run the program
this error is giving in all my paintings .. independent of the query I sent this to be
one of the simplest
the table structure in the path is
CREATE TABLE LOGRADOURO (
ID INTEGER NOT NULL,
TIPO VARCHAR(20) COLLATE WIN_PTBR
);
ALTER TABLE LOGRADOURO ADD CONSTRAINT PK_LOGRADOURO PRIMARY KEY (ID);
[Non-text portions of this message have been removed]