Jeannine,
Sorry, I'm not Bill, but nevertheless I'll try to give you some hints.
First, the use of TUPDateSQL is a relatively advanced method, that you
should use when dealing with tables being cached (using the Cached Updates
property of a table or query). Just like you said, there HAS to be an easier
way of doing this, right? Well, you guessed right.
The easier way of doing this is using the SQL property of a query. Put the
query that you have in mind, just like any Select query. You can pass
paramethers the usual way, using the ParamsByName method. One example:
"Update <table> set <field> = <something> [where ...]"
So, to update the customers table you could write something like this:
Update customers set custno = :newcustno
This query will set custno field from ALL customers (since you are not using
a where clause) to newcustno.
Now comes the call part (supposing your query is named query1):
query1.Prepare; (first of all, prepare the query)
query1.ParamByName('newcustno').AsFloat := (something); (sets the
parameter)
query1.ExecSql; (executes the query!)
Please mind that you do not have to necessarilly give a paramether to use
this type of query (you can pass 2, 3,... or none). I only did this to
explain and to give you the power of this type of query. It's really simple,
isn't it?
Hope this can help you (and please excuse my english...)
Alexandre
Quote
Jeannine Menger wrote:
> I need some coaching please. (Bill Todd - Team B if you are listening, I
> am all ears). I seem to have most of the pieces to call an update or a
> modify query on my Paradox database using Delphi 3, but I still get
> errors. I know I am missing some minor step the HELP files do not
> mention. Please, if someone could, describe to me like I am 4 years old,
> how you create an UPDATE SQL call in Delphi?
> some background: I have seen where the TQuery has an UpdateObject
> property which I can set to be some TUPDateSQL object. I see that the
> TUpdateSQL object has three string properties, for delete, insert and
> modify. From there I get lost in various blunders and miscuses resulting
> in various error messages. I know this has GOT to be simple.
> generally: is there a good book with working exmaples for doing this
> kind of thing in Paradox using Delphi? I can't find it, so far. Does
> Team B have a book of handy tips?
> Jeannine Menger
> PC Synergy
> 760-931-0350