Link to home
Start Free TrialLog in
Avatar of boardtc
boardtcFlag for Ireland

asked on

TQuery, TDbGrid, SQLServer and Live Result set

Hi,

I am hooking a table to an SQL Server table, in order to gaurenteee the correct order is displayed I need to link a Query (do an Order By) to the grid as opposed to a TTable. Howevere, i also need a live result set. When I set RequestLife to True and run the query I get an error message saying Invalid fiedl name (it runs fine if RequestLive is False). Any ideas how I might achieve what I need?

Thanks, Tom.
Avatar of kretzschmar
kretzschmar
Flag of Germany image

hi tom,

an order by clause causes that the query becomes readonly, you need a TUpdateSQL-Component as UpdateObject for the query to make it editable, but this works only with cachedupdates.

if you leave your email here, then i can send you a sample

meikl
Avatar of boardtc

ASKER

Meikl, I'll look into it here, thnak you. My emial if you get a chance is tomcorcoran@email.com

Cheers, Tom.
Avatar of boardtc

ASKER

Miekl, that worked well. Setting the InsertSQL and other stringlists is a little cumbersome but it works fine. Please answer to grade.

Tom.
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial