• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

ASP access to an Access Database

I have an ASP program (http://209.36.114.163/advscripts/test.asp) that can't seem to access an Access database on my website.  Here's the code I wrote for it:
<%
 Set Conn = Server.CreateObject("ADO.Connection")
 'objCmd.Open("realnet")
 'Set objRst = objCmd.Execute("users")

 Conn.Open "realnet"
 Set objRst = objCmd.Execute("SELECT * FROM users")

 objRst.AddNew
 objRst("lastName") = "Downey"
 objRst("firstName") = "Eric"
 objRst("mi") = "W"
 objRst.Update
 objRst.Close
%>
The first SET command causes the thing to bomb!  If anyone can help I'd really appreciate it!

Eric Downey
0
edowney
Asked:
edowney
1 Solution
 
rpoffelCommented:
Your problem could be that the class ADO.Connection was replaced by ADODB.Connection.  You can check your registry to determine that your web server has got the ADODB classes installed.
0
 
JamesNCommented:
It should be:

Set Conn = Server.CreateObject("ADODB.Connection")
                                                             ^^
James
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now