
[ODBC Visual FoxPro Driver]Invalid argument value
I found the culprit, there was nothing wrong with my coding at all it was
the table structure, even though I dont know why..
I had been using a memo field, but when I was updating or adding to the
taable i didnt add anything to this field i just left it blank, but it was
allowed to accept null values.. This worked fine when adding a record but
when modifying a record and keeping the memo field blank it gave me that
stupid error.
If anyone can explain why this happened because it makes absolutly no sense
at all.
I just changed memo to charachter 254 and it works fine.
Quote:
> I dont believe ADO supports Sanpshot or maybe they define it as something
> else, but a Snapshot in DAO just gives the user whats in the recordset but
> does not allow updates.
> Thanks though.
> > Could be that you are using the wrong TYPE of recordset? Try SnapShot
> type.
> > --
> > Julian Milano
> > > Err.Number=-2147467259
> > > Err.Source=Microsoft OLE DB Provider for ODBC Drivers
> > > Err.Description=[Microsoft][ODBC Visual FoxPro Driver]Invalid argument
> > value
> > > I am getting this error when I a SELECT the records I want from the
> > database
> > > and I go to the first and only record
> > > and change its values in the recordset
> > > rs(0)= whatever
> > > rs(1) = whatever
> > > and so on.
> > > The error occurs when I am calling rs.update.
> > > I am using the exact same code to fill in a new record entry (not
> editing
> > a
> > > current record by calling rs.addnew instead of rs.movefirst and it
works
> > > fine and updates fine.
> > > I am opening the database the way i normally do and the way it
normally
> > > works. It seems Ive been at this error for a long time and just cant
> > figure
> > > it out.
> > > Oh and by the way I get an Operation is not allowed in this context
> error
> > if
> > > I try to close the recordset instead of updating it (when a record is
> > being
> > > edited)
> > > Crazy ehh?
> > > I am using VB5/AD02.1