Board index » delphi » Problem vid Locate procedure when using view in a TQuery component

Problem vid Locate procedure when using view in a TQuery component

Hello,

I'm using MSSQL Server 7.0 and BDE 5.1.1.1 and Delphi 4 to connect to a
database in the server.
I'm using a TQuery component that selects values from some tables using a
view i SQL Server.

The SQL statement reads: 'SELECT * FROM v_fxu ORDER BY ArVecka, AnstNr,
DagNr'
It seems to work fine (Open, Next, Prior, Close works) but when I call the
Locate procedure the program generates Access Violation.

The delphi code generating the exception looks like this:

    quVFxu.Locate('Nyckel', NyckelString, [loCaseInsensitive]);

Anyone have had the same problem?

 

Re:Problem vid Locate procedure when using view in a TQuery component


Correction, now when I use the debug setting 'Break on delphi exceptions'
the message is as follows:
'Translate Error. Value out of bounds'.

Andreas Ingo <andreas.i...@pasdata.se> skrev i
diskussionsgruppsmeddelandet:3a65bf4f_2@dnews...

Quote
> Hello,

> I'm using MSSQL Server 7.0 and BDE 5.1.1.1 and Delphi 4 to connect to a
> database in the server.
> I'm using a TQuery component that selects values from some tables using a
> view i SQL Server.

> The SQL statement reads: 'SELECT * FROM v_fxu ORDER BY ArVecka, AnstNr,
> DagNr'

> It seems to work fine (Open, Next, Prior, Close works) but when I call the
> Locate procedure the program generates Access Violation.

> The delphi code generating the exception looks like this:

>     quVFxu.Locate('Nyckel', NyckelString, [loCaseInsensitive]);

> Anyone have had the same problem?

Other Threads