Avatar of johnhardy
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Recordset not being found

I have a new page in DW MX2004
I created a recordset
If I try to create a dynamic table from the menus, a message asks me for a recordset, which is already there but seemingly not recognised.

If I place a textfield on the page and appply a repeat region SB, only one record shows. There are more records in the table.

Sounds like something fundamental is wrong.

Any Ideas please?

Adobe Dreamweaver

Avatar of undefined
Last Comment

8/22/2022 - Mon
Jason C. Levine

Hi John,



Can you create another blank asp file with nothing inside but the code to access the database, and a repeated region that spits out the database values onto the page?  If it doesn't work post the code so we can take a look.  Once that's working you see, you can tailor the rest of the page to your liking!
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes

Its peculiar
I create the page and a recordset
I then try to use Insert > Application Objects > Dynamic Data > Dynamic Table

I then get the Set up Instructions box, Item 4 requires Create Recordset which of course I already have

If I then highlight a field in the recordset and insert it to tye page this works.

However I notice that I always now get the asp badge showing never the field name, which is what I had in the past.

The code is

<!--#include file="Connections/conn_BFSN_OLEDB.asp" -->
Dim rstest
Dim rstest_numRows

Set rstest = Server.CreateObject("ADODB.Recordset")
rstest.ActiveConnection = MM_conn_BFSN_OLEDB_STRING
rstest.Source = "SELECT * FROM Users"
rstest.CursorType = 0
rstest.CursorLocation = 2
rstest.LockType = 1

rstest_numRows = 0
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = 10
Repeat1__index = 0
rstest_numRows = rstest_numRows + Repeat1__numRows
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>

<form name="form1" method="post" action="">
While ((Repeat1__numRows <> 0) AND (NOT rstest.EOF))
  <p><%=(rstest.Fields.Item("UserLastName").Value)%> &nbsp;<%=(rstest.Fields.Item("UserFirstName").Value)%></p>
Set rstest = Nothing

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

How did you learn asp from scratch?

I also still have problems in opening DW could it be I need a reinstall?

>> could it be I need a reinstall?

It's certainly an option, although back up all your sites/work before you attempt this - just in case.

>> How did you learn asp from scratch?

I began learning from books, but I have a real thirst for knowledge and little patience, so about half-way through the books I put them down and began trying to develop sites.  Of course I ran into hundreds of problems, but once your half-way there you can use Google/EE to find your answers.
When I went back to finish the books years later, I realised if I had kept reading them I would have never have had those problems after all...!

ASP however will soon become out-of-date, with the release of ASP.NET, which is much more powerful and is easier for new-starters to pick up, because it has loads of inbuilt database functionality.  If you can possibly afford to host your site on a .NET platform (a little more expensive than classic ASP), then go to the following site and watch the video tutorials for ASP.NET.  There is even a free editor available from Microsoft which I actually use now instead of Dreamweaver.
The books on classic ASP are therefore becoming hard to get because of the newer technologies that bookshops need to accomodate.

"Videos for ASP.NET 2.0 Beginners" - http://www.asp.net/learn/videos/default.aspx?tabid=63#beginners

Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.