Sql Server Table Alias possible fix
Environment running 6.03 (I have 7 I just have upgraded yet)
Running Delphi 6 Enterprise
Windows 2000.
Databases Sql Server 2000/Interbase/Firebird
I have been getting AV's on sql server only reports that are about 3
dataviews deep.
I pinpointed the problem to the below code. the below code gets around the
problem.
But really doesnt solve why the tablealias is wrong.
procedure TdaMagicLinks.ValidateMasterSQLFieldNames;
#323 // The lOrderByField.TableSQLAlias is not pass in the correct
tablealias
lTable :=
FMagicSQL.GetTableForSQLAlias(lOrderByField.TableSQLAlias);
#329
if (lTable <> nil) then
lSelectField := lTempSQL.AddSelectField(lTable,
lOrderByField.FieldName);
I have found the MagicSql error it, I have added
if (lTable <> nil) then
this bit of code is passing in lOrderByField.TableSQLAlias
it is strange as it only occurs on at least 3 levels
deep table connected. It is passing in the Table alias not
original Table
lTable := FMagicSQL.GetTableForSQLAlias(lOrderByField.TableSQLAlias);
thanx
Dave
david.szkilnyk@hr3.com.au
Running Delphi 6 Enterprise
Windows 2000.
Databases Sql Server 2000/Interbase/Firebird
I have been getting AV's on sql server only reports that are about 3
dataviews deep.
I pinpointed the problem to the below code. the below code gets around the
problem.
But really doesnt solve why the tablealias is wrong.
procedure TdaMagicLinks.ValidateMasterSQLFieldNames;
#323 // The lOrderByField.TableSQLAlias is not pass in the correct
tablealias
lTable :=
FMagicSQL.GetTableForSQLAlias(lOrderByField.TableSQLAlias);
#329
if (lTable <> nil) then
lSelectField := lTempSQL.AddSelectField(lTable,
lOrderByField.FieldName);
I have found the MagicSql error it, I have added
if (lTable <> nil) then
this bit of code is passing in lOrderByField.TableSQLAlias
it is strange as it only occurs on at least 3 levels
deep table connected. It is passing in the Table alias not
original Table
lTable := FMagicSQL.GetTableForSQLAlias(lOrderByField.TableSQLAlias);
thanx
Dave
david.szkilnyk@hr3.com.au
This discussion has been closed.
Comments
report is 3 dataviews or more deep. You should upgrade to RB 7.02 (free if
you are already upgraded to RB 7.0) and retest your reports.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com