# Miscellaneous > General Database Discussions >  SQL Error 40002

## davidb

When saving to db sql chucks out error 40002 and kills application. Application was written in VB5 with data recently migrated from sql7 to sql2000.

----------


## skhanal

What's the full error message.

----------


## rmiao

Maybe mdac version mismatch, try upgrade mdac on app server.

----------


## davidb

Updated MDAC still getting same error. SQL2000 running on server 2003 with xp on clients. Error only occurs when saving data, application will open and read data.

Thanks in advance

----------


## rmiao

Do you have complete error message?

----------


## davidb

Full error message reads.
Runtime error 40002
01000: [Microsoft][ODBC SQL SERVER DRIVER][SQL SERVER] this statement has been terminated.

Again thanks in advance

----------


## rmiao

Do you have same version of mdac on both server and client machine?

----------


## davidb

Indeed I do have the same version of mdac running on both app server and clients...

----------


## rmiao

Did you apply any sql2k service pack? Is the db in compatibility level 80?

----------


## davidb

No sp's applied, compatibility level is 80

----------


## rmiao

Apply sp4 if possible.

----------


## davidb

sp4 applied still same as any ideas?

----------


## davidb

product version: 8.00.2039
product level: sp4
edition: enterprise edition

----------


## russellb

are u using ADO in the VB app (i hope)?

try using oledb rather then odbc driver.

----------

