Print Page | Close Window

errors with creatin drop down boxes

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=3955
Printed Date: 30 March 2026 at 5:05am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: errors with creatin drop down boxes
Posted By: beginner
Subject: errors with creatin drop down boxes
Date Posted: 30 June 2003 at 8:58am

Hi,

i have been trying to create a drop down box but i haven't been very successful.This is the error that i get :

ADODB.Recordset (0x800A0E7B)
Cannot change the ActiveConnection property of a Recordset object which has a Command object as its source.

Here is the code:

Dim Cn, DataConn, MyRs, CommandText Set DataConn = Server.CreateObject("ADODB.Connection") DataConn.Open Application("Connection3_ConnectionString") Set Cn = Server.CreateObject("ADODB.Command") Set MyRs = Server.CreateObject("ADODB.Recordset") Cn.ActiveConnection = DataConn Cn.CommandText="Select ContactType From ContactType" MyRs.Open Cn, DataConn, adOpenStatic




Replies:
Posted By: ljamal
Date Posted: 30 June 2003 at 9:28am
Can we get some spacing in the code to make it easier to read??

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net