Solved

Connection problems running the program through debug mode

Posted on 2000-04-04
6
309 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:jlugo
Comment Utility
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
Comment Utility
Check your dll files and register them again.
0
 

Author Comment

by:jlugo
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

743 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now