Solved

database access through ActiveX

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

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…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

786 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