Solved

database access through ActiveX

Posted on 2001-06-06
2
172 Views
Last Modified: 2012-05-04
I have a web page written in JavaScript.  I have an ActiveX control that reads from a database and returns information to the web page.  This works fine if the ActiveX control is accessed in client side script.  HOWEVER, when I try to call the function that accessed the database from the server side script, I get the following message from the ActiveX control (written in MFC):

m_nRetCode: [-1]
m_strError: [Only SQL_DRIVER_NOPROMPT is allowed when connection pooling is enabled ]
m_strStateNativeOrigin:[State:S1110,Native:0,Origin:[Microsoft][ODBC Driver Manager] ]

Does anyone know how to fix this?

allie

0
Comment
Question by:allie
2 Comments
 
LVL 49

Accepted Solution

by:
DanRollins earned 50 total points
ID: 6172796
In the fn to open the database, there is a dwOptions flag.  If you have any way to set that flag to noOdbcDialog (actual value is 8), the problem will go away.

-- Dan
0
 
LVL 2

Author Comment

by:allie
ID: 6177238
Sorry, forgot to post that I'd figured it out, but that's exactly what I did.  I opened the database using:

CDatabase cMyDB;
cMyDB.OpenEx(szDSN, CDatabase::noOdbcDialog);

Note that you have to use OpenEx(), not Open().  Then I passed the pre-opened database to the recordsets I wanted to use.  Works fine now.  Thanks!

allie
0

Featured Post

IT, Stop Being Called Into Every Meeting

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

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

706 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