Error -2147217864 not raised

ADO

    Next

  • 1. ADO & Access DB #error problem
    I have VB6 ado call to an access 2000 db. The connection string looks like this: strAccessConnect = "Driver={Microsoft Access Driver (*.mdb)};" & _ "Dbq=" & strCurrentPath & strCurrentDB & ";" & _ "DefaultDir=" & strCurrentPath & ";" & _ "Uid=;Pwd=;" Where strcurrentpath and strcurrentdb are pretty obvious variables. The MS Access Driver is ver. 4.000.6200 When an divide by 0 occurs in the access Query such that it created a #error message, the recordset that was returned was messed up. If I used a Jet driver from Excel or MSQuery it produces the error "Data Type mismatch" The record in access will look like this 1 100 200 300 400 2 101 201 #Error 401 3 102 202 302 402 In the recordset returned to VB it looks like this 1 100 200 300 400 1 100 200 "" 401 3 102 202 302 402 So when I write out the data, record 1 is repeated with correct data in the fields before the error, but incorrect data after the fields. Is there any way to detect this? I realize that limiting the users to the database, and limiting the input to useable values is a solution, but my hands are tied by the business. I have to be able to detect it on the vb side in case the data is fouled in the future. Thanks in advance Rick Raible Citigroup
  • 2. Help. Access on server question.
    Hello, I have an asp application using 2 Access Databases (on the server) In order to join tables from 2 databases I have created a 3rd database as a ridge In this data base I have only views, throw which I access the other databases. It is working fine, but I have found that even though there are no tables in my ridgedatabase, It is growing !!! Any idea what is causing this behavior and what can I do? Thanks Rami

Error -2147217864 not raised

Postby Richard » Tue, 25 Nov 2003 08:37:43 GMT

Hi,

I work on a vb6 software accessing sql server 2000 with ado2.6 ... and I
struggle with a weird problem ...

When changes are done by two "users" on the same field of one record,
usually the first update is accepted and the second raises the
error -2147217864 like in this example :

    ------
    strSql = "SELECT DISTINCT * FROM Shippers WHERE ShipperID=2"

    rc1.CursorLocation = adUseClient
    rc2.CursorLocation = adUseClient

    rc1.Open strSql, con, adOpenStatic, adLockOptimistic
    rc2.Open strSql, con, adOpenStatic, adLockOptimistic

    rc1!CompanyName = "Test1"
    rc2!CompanyName = "Test2"

    rc1.Update
    rc2.Update
    ------

But the same kind of code (clientside recordsets with optimistic lock)
doesn't work with the sql server database I currently use at work ...
The first update is accepted, then the second update is skipped without any
error message.

Why this error is not generated ?  Does anyone have an idea ?

Thanks in advance (and sorry for the english)







Re: Error -2147217864 not raised

Postby Mike Collier » Tue, 02 Dec 2003 22:35:43 GMT

> I work on a vb6 software accessing sql server 2000 with ado2.6 ...

Make sure you are not using an ODBC based ADO connection.


Try a server side cursor location and pessimistic lock.


Mike Collier BSc (Hons)
ADO Browser for viewing ADO properties & events on your system.
 http://www.**--****.com/ 
https://www.regsoft.net/regsoft/vieworderpage.php3?productid=64520




Return to ADO

 

Who is online

Users browsing this forum: No registered users and 8 guest