Making exe project in vb---URGENTTT!!!

The difficulty is that i have a project with a database appl.(sql-6.5)
using a ADODC control for the working of this proj.When made into an exe for using it on diff. stand alones i get a difficulty in running it which shows an error saying that 'mswinntsck.ocx' and msadodc.ocx' are missing due to which the proj does not work.However if i load vb in these pc's then it works normally,but initially before it starts it shows a msgbox saying that 'adodc-unknown error'.
The adodc in this prj. basically uses a sql query for getting its recordset from the database which i have given it in the form load
I would be glad if a sol. is given to this problem without the necessity of changing the structure of prog.
Who is Participating?

Improve company productivity with a Business Account.Sign Up

prakashbitraConnect With a Mentor Commented:
No problem friend!

Simple just execute Package and Setup wizard and add the required images and all the stuff and be sure that u have selected the database drivers.

and if ur using with the ODBC  connection then u have to create a DSN manually in the client's system.

after creating the setup package installed in the other system. if it is still not working there may be dll files may be corrupted in ur system.
These dll's may available but they may be damaged dll's. for better use install ur drivers once again preferbly install ur visual basic again. it will automatically update ur corrupted dll's.

Never copy some of the dll's individually. This now it may execute correctly..but in long run u will face lot of problems like u have seen now.

happy programming
  Did u create the Setup kit properly?. I think you would haven't selected those two controls. Just copy those two ocxs and place it in the system directory in which this error occurs and then try. I think it should work.


Guy Hengel [angelIII / a3]Billing EngineerCommented:
This is a problem i had also, but with Oracle 7.3.
This seems to be (yet no confirmation) a problem in the communication between the client and the server, probably a rupture. More even, when some dll's of ADO where changed into german version (as IE German was installed), the message read "Unbekannter Fehler".
I solved the problem by resuming when this error occurs, as this solved the problem in 100% of the cases, even if sometimes more than on Resume was done.

Hope you have centralized ErrorHandling.
Good luck
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Try to manually install mdac_typ on the destination PC before running the setup.  (As trupur said - if you use any extra ocxs then make sure you use the Package and Deployment wizard at least once to make sure all the required ocxs are copied+installed on the destination PC).
If u don't wish to create a setup again then u have to manually copy the two Ocx files and paste them in C:\Windows\System Or C:\WinNt\System32 path and then register them both using regsvr32 <ocx name>. Or if u create the setup again make sure u include those ocx files when the setup wizard asks for additional files to be added.

<Smile> This problem often comes guy. relax and keep your cool. I know it will be irritating to know that there is an error in the setup. Relax
kuki_1975Author Commented:
I have added these ocxs seperately again but this did not work thus compelling me to load again VB in those machines,however i have to try with the Package and deployment wizard,but can anyone of u give the details of this method
If you haven't created a Setup package to install it, then you will need to do that.
The Package and deployment wizard is quite easy to use. If you have referenced ADO in your Project References, then the P&D wizard will find the appropriate files and you should see them with little ticks next to them.
The P&D wiz will create a bunch of files, you will need to copy the setup.exe, setup.lst and the .CAB file (not sure if it's needed, but won't hurt) to a drive that can be accessed from the machine you wish to install your app on.
Then just run the Setup.exe program on that machine, and everything should be installed in the correct places.

hope this helps
There are TWO buttons at the top of your text box.. Answer and "COMMENT!".. <smile>.

The Experts before you were kind enough to Comment allowing you the opportunity to put in the same answer as they already had keyed.. <sheesh>. Let the Questioner be the judge as to the suitablilty of each comment, and please don't be so hasty on the Answer button.. <smile>.
ODBC drivers are NOT part of VB and are NOT included as part of the Setup. You have to license and install them separately. The hooks are part of your program's kit, but the low level ODBC32 drivers are *not*. You'll have to have a several stage installation of getting the ODBC32 client installed first, then build the DSN, *THEN* you can install your app and run.

Looks like we disagree again.. <smile>.

You can download and include the Microsoft ODBC Drivers into your PDWizard Redistributioin (Redist) directory, and then include them in your install/setup program. As my copy of MSDN, is a little bit old, it does not specifically mention VB6.. but I feel certain that the same holds true for it.

In reading the list below, you will see that the questioner's SQL Server ODBC Driver is included. It is possible, that the client computer mentioned above does not have one of the Microsoft products listed below installed.. as such.. the Microsoft ODBC drivers were never installed.. or are hopelessly out of date.

The wx3150.exe file alluded to in the MSDN article is a 4.4mb lunker.. but sometimes a man has got to do.. what a man has got to do.. <lol> and <smile>.

Once again.. my MSDN CdRom is old.. you should check with MSDN Online for the latest versions.. <smile>.

From MSDN:
ODBC Desktop Database Drivers 3.5 for 32-Bit Programs

Last reviewed: August 31, 1998
Article ID: Q159674

The information in this article applies to:

Microsoft SQL Server, versions 4.21a, 6.0, and 6.5
Microsoft Access version 7.0 and Microsoft Access 97
Microsoft FoxPro versions 2.0, 2.5, and 2.6
dBASE III, dBASE IV, and dBASE 5 for Windows
Paradox versions 3.x, 4.x, and 5.0
Microsoft Excel, versions 3.x, 4.x, 5.0/7.0, and Microsoft Excel 97
Microsoft Office 97
Microsoft Visual Basic 5.0 <-----
Microsoft Visual C++ 5.0
Microsoft Visual Studio 97

The file discussed in this article (Wx1350) contains the latest Microsoft Open Database Connectivity (ODBC) drivers for the following data sources:

Microsoft SQL Server versions 4.21a, 6.0 and 6.5 <-----

Microsoft Jet database engine version 3.5, which supports the following formats:

    - Microsoft Access versions 2.0, 7.0, and Microsoft Access 97

    - Microsoft FoxPro versions 2.0, 2.5, and 2.6

    - dBASE III, dBASE IV, and dBASE 5 for Windows

    - Paradox versions 3.x, 4.x, and 5.0

    - Microsoft Excel versions 3.x, 4.x, 5.0/7.0, and Microsoft Excel 97

    - Text


As to Licensing: In the End User Licensing Agreement for the ODBC Drivers, it States:


Section 1:
Developing applications using the Visual Basic for Applications ("VBA") component of MS Applications. In addition to the rights set forth in Section 1(a) above, Microsoft grants you the nonexclusive, royalty-free right to reproduce and distribute the object code version of the SOFTWARE, provided you comply with Section 5 herein.

Section 5:
EXPORT RESTRICTIONS. You agree that neither you nor your customers intend to or will, directly or indirectly, export or transmit (i) the SOFTWARE or related documentation and technical data or (ii) your software product as described in sections 5 and 6 of this License (or any part thereof), or process, or service that is the direct product of the SOFTWARE, to any country to which such export or transmission is restricted by any applicable U.S. regulation or statute, without the prior written consent, if required, of the Bureau of Export Administration of the U.S. Department of Commerce, or such other governmental entity as may have jurisdiction over such export or transmission.


If you'ld read both the Q and your response closely you'ld notice that the Q was asking about ORACLE and your response doesn't include Oracle in the list...

Again, I stand by my statement. The ODBC32 drivers for *ORACLE* are *NOT* automatically included in your P&D build! You have to license and install them separately.

(I use this configuration all day at work and have run into this *exact* problem several times...)

kuki_1975Author Commented:
dear mark..,and others..
thank u but in my datacontrol i am using the 'connection string property',because my basic intention was to avoid the usage of DSN's so that it does not depend on specifis client but now i think i have got too many responses for which i will have to try it out as the first thing in morning
kuki1975 writes: "The difficulty is that i have a project with a database appl.(sql-6.5)"

I do not have or use Oracle.. but if I go to my Control Panel and click on the ODBC Data Sources applet.. and then click on the Add button there.. guess what I find?..

"Microsoft ODBC Driver For Oracle" (MSORCL10.DLL)
"Microsoft ODBC For Oracle" (MSORCL20.DLL)

Hmmmmm.. <scratching head>.. I wonder how they got there?.. <smile> and a <wink>.
Guy Hengel [angelIII / a3]Billing EngineerCommented:
*Visual Studio
& Versions of these
kuki_1975Author Commented:
yes this is now working with P&D but now the problem is that it does not work on NT nontheless it is working on other clients,on NT it does not show any error but other features of prj work properly with the main thing i.e it does not get connected to the server
kuki_1975Author Commented:
dear prakashbitra
thanks for the reply but the same idea was also put forward by Dawson earlier to u so if possible try to transfer these points to him because i am not able to do it now
kuki 1975:
Are all the MDAC components up to date on the machine you are working on?.. If not.. its possible that they won't work on other machines. To get the latest version of MDAC for distribution with your program go to this link:

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.