Solved

Connection problems running the program through debug mode

Posted on 2000-04-04
6
318 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…

726 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