Solved

Using ActiveX Data Objects

Posted on 1998-08-27
7
177 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
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now