?
Solved

Connection problems running the program through debug mode

Posted on 2000-04-04
6
Medium Priority
?
322 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 600 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

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!

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Suggested Courses
Course of the Month10 days, 2 hours left to enroll

762 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