Re: ADO - Retrieve and update values



IanJ wrote:

> Hi,
>
> D5, WinXP, SQLServer 2000, MDAC 2.7
>
> I have a table with one row that contains key values for other
> tables. To get the next key value I query the table, store the key
> value, close the query. I then use another query to update the table
> with an incremented value as the next available key. The code is
> shown below (uses ADO)
>
<snip>

i'm a bit confused about you want to accomplish. Specifically:

- Why a table with just one row? What sense has that?

- Why do you need an attribute to be set for *all* the records? Do you
really need that attribute?

- Are you trying to define some sort of master-detail relationship
between 2 tables? I mean like "1 author has written N books"?

--
Best regards :)

Guillem Vicens
Dep. Informática Green Service S.A.
www.clubgreenoasis.com
--
in order to contact me remove the -nospam
.



Relevant Pages

  • Re: abstraction of table relationships
    ... > the relationships between tables to make queries shorter. ... He gave the example of Books and Authors. ... > be better if one could query all books by a given author ... > done with natural join in mind. ...
    (comp.databases.theory)
  • Re: Form Advice Relating to Queries
    ... books, Mastering Access 2002 Premium Edition, Access InsideOut 2002 by Helen ... For more complex queries, use vba programming..... ... I haven't quite worked out how to use the Query Builder via ... ... The form's RecordSource property is a string. ...
    (microsoft.public.access.forms)
  • Re: Return to form if query unmatched
    ... sends the number to he main BOOKS form, which is based on the following query: ... FROM BOOKS ... If it doesn't pop up a message and set Cancel = True. ... Doug Steele, Microsoft Access MVP ...
    (microsoft.public.access.queries)
  • RE: Only Return Lastest Date From Records
    ... Yes it is SQL and it will show all the books in the result. ... query open the query designer in the usual way, but don't add any tables, ... represented in the Transactions table with its latest Date In value. ...
    (microsoft.public.access.queries)
  • Re: Return to form if query unmatched
    ... sends the number to he main BOOKS form, which is based on the following query: ... FROM BOOKS ... Dim MyRecCount As Long ... If it doesn't pop up a message and set Cancel = True. ...
    (microsoft.public.access.queries)