We help IT Professionals succeed at work.

Capability not supported error with SQLServer and ODBC - is there a solution?

rmaranhao
rmaranhao asked
on
1,297 Views
Last Modified: 2011-09-20
The following query:

select * from table where (1=1)  and ForignKey in  ( 0, 2, 3 )

returns an error if I try to open it with RequestLive set to true. If I set RequestLive to false then it opens ok.

I need to edit the values returned by this query. Is there a way??

I know that using ADO will solve my problem but since I am planning to run this program with other databases I cannot switch to ADO right now.

Delphi 5, updates 1 and 2.
 
Comment
Watch Question

Top Expert 2004

Commented:
you have to use a TUpdateSQL attached as
UpdateObject (property)
of your tquery and run the
query with cachedUpdates(property) = true

to set the insert/update/delete statements
just use the wizard, which comes up with a dblClick

don't forget to use

query.ApplyUpdates;
query.CommitUpdates;

in the afterpost and afterdelete-events

just tell me, if this may a way for you

btw. ado supports also multiple databases

meikl ;-)

Author

Commented:
Ok. This solves one problem.
What I still don't understand is why won't the BDE allow me to run this simple query requesting live....

Do you know what clauses will require the UpdateObject even if I am using a single table?

In this specific case I have the following problem: The table I am selecting changes, so I cannot use the wizard to create the Insert/Update/Delete commands. I have no problems with SQL and can do this programatically, but I'd really like to find a more simple and direct solution.

Thanks for the prompt advice,
Roberto.
Top Expert 2004
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
I'm sorry it took me so long to grade the answer.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.