?
Solved

Using ActiveX Data Objects

Posted on 1998-08-27
7
Medium Priority
?
193 Views
Last Modified: 2013-12-25
Hello I'm try to develop a web site on my computer using Personal Web Server as the testing plateform.  When I use the following lines

set rs = Server.CreateObject("ADODB.Recordset")
  rs.open "SELECT * FROM Directors WHERE Region=" & Request.Querystring("Region"), "DSN=AirMLS;uid=" & Application("uid") & ";pwd=" & Application("pwd"), 0, 1
  where = 1

I get a class not registered error.  How do I go about fixing this error.  The ActiveX Data Object are registered on the computer because I can easily use them from within VB5.  So what do I have to do to make them available from the Personal Web Server.
0
Comment
Question by:clsmaster
[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
7 Comments
 
LVL 4

Expert Comment

by:mcix
ID: 1854604
First, which OS are you running on?

Second, What version of Personal Web Server are you running?
0
 
LVL 3

Expert Comment

by:percyn
ID: 1854605
If you get a Class not registered error, it would happen before it even gets to the Rs.Open statement.

There are several versions of OleDB floating out there...install the latest one.
0
 

Author Comment

by:clsmaster
ID: 1854606
Where can I get the lastest copy.
0
Python: Series & Data Frames With Pandas

Learn the basics of Python’s pandas library of series & data frames and how we can use these tools for data manipulation.

 
LVL 1

Expert Comment

by:gasim
ID: 1854607
<% SET rs = Server.CreateObject("ADODB.Recordset")
rs.open "DSN=AirMLS;UID=" & Application("uid") & ";pwd==" & Application("pwd")" "
MyQuery="SELECT * FROM Directors WHERE Region=" & Request.Querystring("Region")"
Set myQueryRS= rs.Execute(MyQuery)%>

Always try to set you query in a variable before calling Open method.
0
 

Author Comment

by:clsmaster
ID: 1854608
The answer was caused by an incorrectly registered class.
0
 

Expert Comment

by:ajoy092498
ID: 1854609
Just check the installation of PWS.
0
 
LVL 10

Accepted Solution

by:
MasseyM earned 100 total points
ID: 1854610
It has nothing to do with PWS... Get the newest database drivers from Microsoft... here is the URL: http://microsoft.com/data/mdac2.htm

Also, you code should look something like this:
<%
    Set conn = Server.CreateObject("ADODB.Connection")
    conn.open "airMLS",Application("uid"),Application("pwd")
    Set Session("airMLS_conn") = conn
%>
<%
    sql = "SELECT * FROM Directors WHERE Region=" & Request.Querystring("Region") & ";"
    Set rs = Server.CreateObject("ADODB.Recordset")
    rs.Open sql, conn, 3, 3
%>

That is the proper database connection setup...

0

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This video teaches users how to migrate an existing Wordpress website to a new domain.
Suggested Courses

800 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