Solved

database access through ActiveX

Posted on 2001-06-06
2
184 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
[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
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…
Suggested Courses

615 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