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
Solved

database access through ActiveX

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Dynamic Dropdowns 15 32
100% tall div not scrollable on iPhone 3 20
HTML Anchor Link Problem 3 35
How do I show metrics with PHP or Javascript 6 32
This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

839 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