[ODBC Visual FoxPro Driver]Invalid argument value 
Author Message
 [ODBC Visual FoxPro Driver]Invalid argument value

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



Mon, 10 Mar 2003 03:00:00 GMT  
 [ODBC Visual FoxPro Driver]Invalid argument value

Could be that you are using the wrong TYPE of recordset? Try SnapShot type.

--

Julian Milano


Quote:
> 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



Tue, 11 Mar 2003 09:08:31 GMT  
 [ODBC Visual FoxPro Driver]Invalid argument value
Are you using server side or client side cursors?
I believe the driver only supports client side...


Tue, 11 Mar 2003 03:00:00 GMT  
 [ODBC Visual FoxPro Driver]Invalid argument value

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.


Quote:
> 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



Tue, 11 Mar 2003 03:00:00 GMT  
 [ODBC Visual FoxPro Driver]Invalid argument value

Its all client side.


Quote:
> Are you using server side or client side cursors?
> I believe the driver only supports client side...



Tue, 11 Mar 2003 03:00:00 GMT  
 [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



Tue, 11 Mar 2003 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. [ODBC Visual FoxPro Driver]Invalid argument value

2. Need help creating Fox 2.5 table via MS Visual FoxPro ODBC driver

3. [ODBC Visual FoxPro Driver]SQL: Statement too long.

4. ODBC driver error with Visual Foxpro Version 9

5. Help: Intersolv FoxPro ODBC Driver

6. Excel VBA/Macintosh/Q+E FoxPro ODBC driver

7. FoxPro ODBC Driver Shows Deleted Records

8. Need ODBC driver for FoxPro data

9. invalid argument value

10. Oracle ODBC driver / Microsoft ODBC driver for Oracle

11. Unable to connect using Visual FoxPro driver when quote is in path

12. IRowsetIndex Support in Visual FoxPro OleDB driver

 

 
Powered by phpBB® Forum Software