Upgraded to Windows 2000 from 98SE, ADO connection failure

Upgraded to Windows 2000 from 98SE, ADO connection failure

Post by Sean Grebe » Sat, 14 Jun 2003 14:17:26



I upgraded to Windows 2000 from Windows 98 recently. Some
software I had written in Visual Basic 6.0 that worked
fine prior to the upgrade now is unable to open my ADO
Connection. I have tried several databases in both SQL
Server and Access, and all fail on the Connection.Open
statement. I had previously used MDAC 2.5 and have
upgraded to MDAC 7.1. Any thoughts on where the error
might be coming from. Here is a code fragment example of
what I am doing....it is pretty straight forward:

  ' Create Ado objections for DB Communication
  Set sAdoDBCon = New ADODB.Connection
  Set sAdoDBRec = New ADODB.Recordset

  ' SQL Select statement
  strSQL = "SELECT * FROM master"

  ' Error handling
  On Error GoTo Error_cmdRead_Click

  ' Connect to the Database via ODBC
  sAdoDBCon.ConnectionString = "DSN=CAMDB"

  ' **************************************************
  ' *** Fails on this Open statement
  ' **************************************************
  sAdoDBCon.Open
  sAdoDBRec.Open strSQL, sAdoDBCon, adOpenKeyset,
adLockOptimistic

 
 
 

Upgraded to Windows 2000 from 98SE, ADO connection failure

Post by Val Mazu » Sat, 14 Jun 2003 21:07:08


Hi Sean,

Your application should work with Windows 2000 without any changes in code
or recompiling of code. What is MDAC 7.1? There is not such version of MDAC.
Latest one, which you could install on Windows 2000 and which available for
download is MDAC 2.7. What kind of error message do you get?
It is possible that MDAC installation was corrupted and you could check it
if you run Component Checker utility from MDAC to see if it is fine or not.
If it is not, then you would need to run MDAC installation again to fix it

--
Val Mazur
Microsoft MVP


Quote:> I upgraded to Windows 2000 from Windows 98 recently. Some
> software I had written in Visual Basic 6.0 that worked
> fine prior to the upgrade now is unable to open my ADO
> Connection. I have tried several databases in both SQL
> Server and Access, and all fail on the Connection.Open
> statement. I had previously used MDAC 2.5 and have
> upgraded to MDAC 7.1. Any thoughts on where the error
> might be coming from. Here is a code fragment example of
> what I am doing....it is pretty straight forward:

>   ' Create Ado objections for DB Communication
>   Set sAdoDBCon = New ADODB.Connection
>   Set sAdoDBRec = New ADODB.Recordset

>   ' SQL Select statement
>   strSQL = "SELECT * FROM master"

>   ' Error handling
>   On Error GoTo Error_cmdRead_Click

>   ' Connect to the Database via ODBC
>   sAdoDBCon.ConnectionString = "DSN=CAMDB"

>   ' **************************************************
>   ' *** Fails on this Open statement
>   ' **************************************************
>   sAdoDBCon.Open
>   sAdoDBRec.Open strSQL, sAdoDBCon, adOpenKeyset,
> adLockOptimistic


 
 
 

Upgraded to Windows 2000 from 98SE, ADO connection failure

Post by SeanGrebe » Tue, 17 Jun 2003 17:47:56


Sorry, typo, I meant MDAC 2.7 sp1. Thanks for the advice.
Something must have been currupted in my load of Win2k.
Since I had freshly loaded the system I decided to
reinstall the OS and the problem went away. Thank you
though.

Sean

Quote:>-----Original Message-----
>Hi Sean,

>Your application should work with Windows 2000 without
any changes in code
>or recompiling of code. What is MDAC 7.1? There is not

such version of MDAC.
Quote:>Latest one, which you could install on Windows 2000 and
which available for
>download is MDAC 2.7. What kind of error message do you
get?
>It is possible that MDAC installation was corrupted and
you could check it
>if you run Component Checker utility from MDAC to see if
it is fine or not.
>If it is not, then you would need to run MDAC

installation again to fix it

>--
>Val Mazur
>Microsoft MVP



>> I upgraded to Windows 2000 from Windows 98 recently.
Some
>> software I had written in Visual Basic 6.0 that worked
>> fine prior to the upgrade now is unable to open my ADO
>> Connection. I have tried several databases in both SQL
>> Server and Access, and all fail on the Connection.Open
>> statement. I had previously used MDAC 2.5 and have
>> upgraded to MDAC 7.1. Any thoughts on where the error
>> might be coming from. Here is a code fragment example of
>> what I am doing....it is pretty straight forward:

>>   ' Create Ado objections for DB Communication
>>   Set sAdoDBCon = New ADODB.Connection
>>   Set sAdoDBRec = New ADODB.Recordset

>>   ' SQL Select statement
>>   strSQL = "SELECT * FROM master"

>>   ' Error handling
>>   On Error GoTo Error_cmdRead_Click

>>   ' Connect to the Database via ODBC
>>   sAdoDBCon.ConnectionString = "DSN=CAMDB"

>>   ' **************************************************
>>   ' *** Fails on this Open statement
>>   ' **************************************************
>>   sAdoDBCon.Open
>>   sAdoDBRec.Open strSQL, sAdoDBCon, adOpenKeyset,
>> adLockOptimistic

>.

 
 
 

1. ADO Connection Problem and Windows 2000 - multiuser problem

I am trying to connect to an Access 2 jet data base ( see below)

*************************************************
  Set cnnJtables = New ADODB.Connection
  strProvider = "Microsoft.Jet.OLEDB.4.0"

 With cnnJtables

      .Provider = strProvider
      .Properties("Jet OLEDB:System DataBase") = strWHSystem
      .Open strJTables & "\Jtables.mdb", strUsr, strPW

 End With
****************************************************

If  the tables (Jtables.mdb) are currently in use (ie open by another
application )
then the connection fails with error number 2147467259 - 'file already in
use'.
The code works fine if the other application is not active. It also runs
fine with
win 98 and NT4. I have checked the
security levels for the file in question (jtables.mdb) and all seems ok -
full access with system previlidges. Does anyone have any ideas. Thanks

noel

2. user-defined function not showing in view wizard

3. ADO DSN-Less Connection in Windows 2000

4. Exact effect of Locking in databases ?

5. Windows 2000 IIS5 ADO 2.5 ODBC DSN-less Text connection

6. Error 2140

7. OS upgrade from NT4 to Windows 2000 for MSSQL 2000

8. Restore with different sort orders

9. SQL 2000 Upgrade Failure

10. URGENT - Communication Link Failure error more prevalent since SQL 2000 Upgrade

11. SQL 2000 Upgrade Failure

12. sql7 7 to 2000 MDAC upgrade failure

13. ADO under windows 2000 and windows 98 - append