Subject RE: [IBO] Access Violation, Error in FPXSQLVAR.aliasname_length
Author Jason Wharton
Can you reproduce this in a simple test case?
I'm not real sure what the problem could be.
The callstack might be helpful.

Jason Wharton

-----Original Message-----
From: jaguarius2003 [mailto:jaguarius@...]
Sent: Tuesday, July 20, 2004 8:49 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] Access Violation, Error in FPXSQLVAR.aliasname_length


Hi All,

I am having a very serious problem with my program which I have been
unable to resolve for two weeks. I posted before but no one was able
to help, so I thought I would add some additional info.

I have a TIB_Query called WorkDocket, which I edit and insert to with
a modal form. There are a couple of required fields. If the fields are
not filled in, instead of getting an error message I get this :

Project xxxxxxxxxx.exe raised exception class EAccessViolation with
message 'Access violation at address 00514A0E in module
'xxxxxxxxxx.exe'. Read of address 0000000C'. Process stopped.

from time to time if I step through it I get 'cannot focus a disabled
or invisible window'. I am aborting the form close if there is an
error, so I dont know why this would happen. After the error, the file
IB_Components.pas opens up to the following section :

function TIB_Column.GetFieldName: string;
begin
>>if FPXSQLVAR.aliasname_length <={!!} 0 then
Result := ''
else
begin
Result := Copy( FPXSQLVAR.aliasname, 1, FPXSQLVAR.aliasname_length );
Result := Statement.IB_Connection.mkVARIdent( Result );
end;
if ( Result = '' ) and ( Statement.SQLDialect < 3 ) then
Result := 'COLUMN' + IntToStr( FieldNo );
end;

this is apparently whats causing the access violation when my program
tries to generate an error. Can anyone offer any kind of advice? I
tried rebuilding the form and it did not help at all. I am close to
launch and this bug just cropped up.

Thanks,

Jason S. Gagnon