> > ' I am getting an error when I try to update the value of Posted to 1.
> >
[quoted text clipped - 50 lines]
>
>The data types are as follows:
> > > ' I am getting an error when I try to update the value of Posted to 1.
> > >
[quoted text clipped - 71 lines]
>
> Jean
First. Always enumerate the Errors Collection. Subsequent messages may
provide more information.
https://msdn2.microsoft.com/en-us/library/aa905919(sql.80).aspx
I assume queryTenders is a SQL Statement? (I should have asked earlier).
The .Update method works by ADO creating (behind the scenes) its best guess
as to what an Update statement would look like based on the Query. This
error commonly occurs if due to database/table constraints or query criteria
an unambigous update statement can not be constructed.
It can also occur if one of the fields you are updating doesn't contain the
proper datatype. But it doesn't look like this is a problem in your case as
Strings and Integers are hard to mismatch. Are you sure Posted is an
"Integer" in the Table?
As a quick check write your own Update Query based on the new values and see
if it works as expected. Remember you are only changing one field - but ADO
is going to be using the entire query to build its criteria for updating
THAT record.
If the above doesn't help, post your query, the DDL for the table/s
involved, and the specific database.
hth
-ralph
JeanH - 24 Jun 2007 05:34 GMT
> > > > ' I am getting an error when I try to update the value of Posted to 1.
> > > >
[quoted text clipped - 100 lines]
> hth
> -ralph
Hi Ralph,
Thanks for your help. I went ahead and wrote a second ADODB.Command to do
the update independently of that record set and used the record ID to single
out the record in question. The error was probably some kind of ambiguity and
I had read about using a simple SQL update and it seems to be working.
Undoubtedly I will go back to this at some time and try tomake the .update
work but I spent all day on this and have to get my project done. I'll take
your suggestions and see what i come up with. Thanks again.