ActiveX ODBC Connection Control Works in VB (and IE) but not in FOXPRO! The same control works in one but not in other! (gah)

Posted on 2004-08-13
Last Modified: 2013-12-25
My ActiveX Control connects to an ODBC connection (made through the control panel)

It works in VB and works in IE, (and any other activex container..)

But when i put it into VisualFoxPro6 (where it was intended to be put), it says it can't create connection or some weird error. I'll post the exact error message soon.


mycode is:
rsConn.Open "termsconn" <-- that's the name of the connection. That's where its having the error.

Question by:Anderson_Enterprises
  • 3
  • 2
LVL 29

Expert Comment

ID: 11795104
Please post more of your code.  It seems you are trying to open a recordset with a connection string.  Is rsConn a recordset or connection object?


Author Comment

ID: 11795752
Because you are the only guy that answered, i'm going to award you the points...

i've found the answer.

Apparently when (in foxpro) you type:
 USE Calendar

It opens a connection to the Calendar Database. (That's what I want!)


The ODBC driver CANNOT access Calendar when its 'in use' even when you don't use it exclusive.

The solution was to Close all instances of the calendar database. Apparently ActiveX/FoxPro/VisualBasic don't like to share connections to databases. EVEN WHEN they advertise that ability.

-Michael Smyers
LVL 29

Expert Comment

ID: 11795838

Thanks, but no thanks.  If you answered your own question, you should post to the Community Support area and ask for the question to be closed and the points refunded.  I would much rather have that happen then get a C grade.

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.


Author Comment

ID: 11796168
Hm, How do I go about fixing this for you? I hadn't thought about the negative connotations associated with a C..

I'll see what I can do!

-Michael Smyers
LVL 29

Expert Comment

ID: 11796309
I already made the posts.  A mod should be coming along any time now.


Accepted Solution

CetusMOD earned 0 total points
ID: 11797458
Unaccepted per request http:Q_21093220.html

Closed, 500 points refunded.

Community Support Moderator

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

708 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

17 Experts available now in Live!

Get 1:1 Help Now