Solved

Using ActiveX Data Objects

Posted on 1998-08-27
7
189 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
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

 
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 50 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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
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…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

705 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