• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 326
  • Last Modified:

Connection problems running the program through debug mode

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
jlugo
Asked:
jlugo
1 Solution
 
samopalCommented:
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
 
mdouganCommented:
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
 
jlugoAuthor Commented:
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
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.

 
jlugoAuthor Commented:
One more thing, when the compile fails, it highlights the same line of code above "Set cn = ...". Maybe its an RDO issue.
0
 
MIrfanCommented:
Check your dll files and register them again.
0
 
jlugoAuthor Commented:
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now