Solved

Connection problems running the program through debug mode

Posted on 2000-04-04
6
313 Views
Last Modified: 2013-12-25
When trying to run the VB program through the VB IDE, I get the following error message "ODBC Connection to SQL Server could not be created. Please contact your database administrator.

Also, when attempting to compile the program, I get "Compile error: Permission denied". Its probably related to the above problem.

Yes, my data source information is correct, and I have the latest drivers for SQL Server. If I test the data source, it completes successfully.

Any ideas?
0
Comment
Question by:jlugo
6 Comments
 
LVL 9

Expert Comment

by:samopal
ID: 2684251
No, it's a different problems. "Permission denied" means that you couldn't save your compiled program - this program may be running at this moment, or file is busy by another application, or you don't have rights to write in this directory... Try to save your program on c:\ with different name...
To answer on your first question, please provide the line in program, which gives this error.
0
 
LVL 18

Expert Comment

by:mdougan
ID: 2684571
If this were the psychic Experts network we might have a clue, but unless you can show us your code, it's purely guesswork.  Are you using ADO?  DAO?  RDO?  Did this ever work?  Have you ever been able to compile it?  Try highlighting all of the files in your source directory and right-clicking to bring up the properties.  Then, uncheck the Read Only if it is checked.  Make sure that you're compiling to a directory that you have write access to, and that you're not currently running another copy of the EXE.

Then, you should be able to compile, and tell us if you're able to connect from the EXE, and not from the IDE
0
 

Author Comment

by:jlugo
ID: 2703997
The app is using both DAO and RDO. The project files are under Source Safe source control. The app compiles and runs fine from the two other NT workstations. But for some reason, we have troubles with the third workstation.

It is failing at the RDO function OpenConnection():

Set cn = rdoEngine.rdoEnvironments(0).OpenConnection(dsName:="",Connect:="ODBC;DATATBASE=db;DSN=dsn;uid=uid;pwd=pwd")
'where cn is a rdoConnection

Permission Denied problem:
I set all files in the project folder to writable. I tried compiling to a new exe file name. I still get the error.
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:jlugo
ID: 2704174
One more thing, when the compile fails, it highlights the same line of code above "Set cn = ...". Maybe its an RDO issue.
0
 

Accepted Solution

by:
MIrfan earned 200 total points
ID: 2709020
Check your dll files and register them again.
0
 

Author Comment

by:jlugo
ID: 2792342
As it turns out, the computers that aren't having this problem are the ones that first had VB5, then upgraded to VB6.

The computer having this problem never had VB5, just VB 6. It didn't help to uninstall VB6, then install VB 5, then VB6 again.

We reinstalled Windows, then VB5, then VB6, and everything works now. This is insane.

I really dislike Microsoft's development environments !
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question