Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 951
  • Last Modified:

ERROR 3706 Provider Not Found Visual Basic 6

I have a vb6 program deployed in many machines. Some of them stop because of a 3706 error provider not found. I have tred several variations to the string connections:

Select Case conn_item


Case 0
conn_s = "Driver={Microsoft Access Driver (*.mdb)};" & _
   "Dbq=" & vacPath & "cpcvacations.mdb;password = rami4809"


Case 1

conn_s = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
           "Data Source=" & vacPath & "cpcvacations.mdb;" & _
           "Jet OLEDB:Database Password=rami4809"
           
           
Case 2
           
conn_s = "ODBC;DBQ=" & vacPath & "cpcvacations.mdb;DefaultDir=" & Left(vacPath, Len(vacPath) - 1) & _
";Driver={Microsoft Access Driver (*.mdb)};DriverID=25;FIL=MS Access;MaxBufferSize=2048;Maxscanrows=8;" & _
"PageTimeout=5;PWD=rami4809;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=yes"
           
           
Case 3

conn_s = "DSN=Vacations;DBQ=" & vacPath & "cpcvacations.mdb;DefaultDir=" & Left(vacPath, Len(vacPath) - 1) & _
";DriverID=25;FIL=MS Access;MaxBufferSize=2048;Maxscanrows=8;" & _
"PageTimeout=5;SafeTransactions=0;Threads=3;UID=admin;PWD=rami4809;UserCommitSync=yes"
           
           
Case 4

conn_s = "ODBC;DSN=Vacations;DBQ=" & vacPath & "cpcvacations.mdb;DefaultDir=" & Left(vacPath, Len(vacPath) - 1) & _
";DriverID=25;FIL=MS Access;MaxBufferSize=2048;Maxscanrows=8;" & _
"PageTimeout=5;SafeTransactions=0;Threads=3;UID=admin;PWD=rami4809;UserCommitSync=yes"


Case 5



conn_s = "ODBC;DSN=Vacations;DBQ=" & vacPath & "cpcvacations.mdb;DefaultDir=" & Left(vacPath, Len(vacPath) - 1) & _
";DriverID=25;FIL=MS Access;MaxBufferSize=2048;Maxscanrows=8;" & _
"PageTimeout=5;SafeTransactions=0;Threads=3;UID=admin;PWD=;UserCommitSync=yes"
           
End Select


the only difference between 3 and 4 is that ODBC has been removed and then it works (without ODBC). I have tried to use the jet also but no such luck even when installed. Have not checke for proper registrations yet but I have hear that it may have something related to XP SP-2 and or administration provileges when making the installation. Any ideas?

Thx
0
capeco
Asked:
capeco
  • 5
  • 3
  • 3
  • +1
1 Solution
 
Ariful AmbiaHead of ITCommented:
HI

What does u mean by "Some of them"? Is that same software fails to connect when performing any particular operation?
U can give a try using Visual Basic 6.0 SP5. Don’t use SP6.

Noman
0
 
SStoryCommented:
do you have the correct MDAC_TYP.EXE installed on the client?
0
 
PreeceCommented:
You said that some of them give the error 3706, which ones?  Maybe the connect string that has the correct provider has a different problem?  Just a guess, but what is the value of vacPath?  Maybe you are missing a backslash:

this:
    vacPath & "cpcvacations.mdb

maybe shoud be:
    vacPath & "\cpcvacations.mdb


Preece
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
capecoAuthor Commented:
I guess is too late since all machines had been installed with the latest sp. An these are XP machines which come with 2.8 preinstalled. I have read possible causes that range to improper XP installation because of privileges (which don't seem to be the case here and I can not re-install MDAC). I have even tried to run a short excel macro to connect to DSN MS Access w/o any luck.
0
 
PreeceCommented:
Some things come to mind:

-  Not sure if this will make a difference, but ensure your DSN is a system DSN
-  In your VB project, maybe you need to change the ADO reference to 2.8 (you may need to install 2.8 on your dev box)
-  If ADO 2.8 is not an option on your dev box, look into downgrading ADO on the target pc's

Hope that helps,
Preece
0
 
capecoAuthor Commented:
The PC where I am currently running the tests has XP-SP2 which has the latest version of MDAC-2.8 SP1 . Whereas the machine where I am creating the program has no XP-SP upgrade. In the target PC i just also reinstalled the lates VB SP with no luck. I am trying to run Case 0 whihc is the simplets and work perfectly in my machine. No luck withthe target machine. Next I'll try to intall/uninstall visual basic in the target machine and see how it goes. The thing that troubles me is that even a simple connection such as the Case 0 can not be made to run even on excel which points me in the direction that some dll's have not been properly installed but i can not even uninstall/reinstall MDAC or MDAC SP-1 as this is restricted in XP even with adm. priv.! Though Luck!
0
 
Ariful AmbiaHead of ITCommented:

Hi

Dont use Visula Basic SP 6 it has some porblem. Use SP5. not getting any clue.


Noman
0
 
PreeceCommented:
"Whereas the machine where I am creating the program has no XP-SP upgrade"

Would it make sense to apply the XP-SP2 on your dev box?

Preece
0
 
capecoAuthor Commented:
Program aside i made a very small routine in an excel spreadsheet as follows:

Sub test()

Dim db As New ADODB.Connection

vacpath = "\\NT_Server\Share\Vacations\"

conn_s = "Driver={Microsoft Access Driver (*.mdb)};" & _
   "Dbq=" & vacpath & "cpcvacations.mdb;password = rami4809"

db.Open conn_s

End Sub

Of course reference to 2.8 is made in the spreadsheet. Works fine in my machine does not works on the subject machine. Get same 3706 error.

0
 
capecoAuthor Commented:
Cooment to the above:

Sub test()

Dim db As New ADODB.Connection

vacpath = "\\NT_Server\Share\Vacations\"

conn_s = "Driver={Microsoft Access Driver (*.mdb)};" & _
   "Dbq=" & vacpath & "cpcvacations.mdb;password = rami4809"

conn_s = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
         "Data Source=" & vacpath & "cpcvacations.mdb"




db.Open conn_s

End Sub

Changed the conn_s to use Jet. Again works fine on my pc crashes on the target (different error -274722099 Method 'Open' ____ failed.)
0
 
capecoAuthor Commented:
Followed the procedure belowe to repair the mdac and it worked!

OK, how to repair a copy of MDAC 2.8 on WinXP with SP2 installed

first, locate the mdac.inf file in c:\windows\inf right click and
install
when prompted for a location, point to
c:\windows\servicepackfiles\i386 then when promtpet for the XPcd,
either load the cd or point to c:\i386

hey presto, this reinstalls / repairs MDAC 2.8

Ran into a couple of files not found that had to look on different directories but in the end it all came together. TY
0
 
SStoryCommented:
so MDAC was the problem after all.
0
 
SStoryCommented:
More than one person mentioned MDAC / ADO as being the issue.  The author says the solution was basically to fix MDAC.  Consequently, I'm not sure that a refund is right, but I will leave  this issue with the Admins and will be fine either way.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 5
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now