Link to home
Start Free TrialLog in
Avatar of johnhardy
johnhardyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Dreamweaver Repeat region

Hello
I have a page with a table to be filled by data from access.mdb

I want the table to contain data from an access table.

I tried to create a repeating region but it asks for a recordset.

A recordset already exists on the page

Please see the attached image.

Cant think what I am doing wrong but must be something!

Many thanks
John

User generated image
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Dreamweaver needs to see its own code for recordsets in order to use the built-in behaviors.  If you change the generated code at all or use custom code to make a recordset, DW may not allow you to use behaviors.

If this is all plain vanilla code, you may have to delete the WinFileCache-xxxxxxx.dat file from your configuration folder to get this to work.
Avatar of johnhardy

ASKER

Jason Thanks
I was using Insert Data Objects Repeat Region which did not work.

When I used Server Behaviours Repeat Region is worked OK.

Do you know the difference please?

Thanks
John
Thats Strange
I inserted some text and a further image because I could not get a master detail working.
Same problem.
Here is the image again.
User generated imageJust one bit more ...

I am now  unable to insert a Recordset Navigation Bar.

regards

John
My best advice is to learn to code yourself and break your dependency on DW. DW packaged code is heavy and unnecessarily complicated. For 200 or 300 lines of DW generated code I can do the same thing in 40-50 lines of code, and often less.

For example, here's a really simple table output of member from a recordset called "rs"...

      <% If DisplayMembers then %>
      <table width="800" border="0" cellspacing="0" cellpadding="4">
        <tr class="RowHeader">
          <td class="RowHeader"><div align="left"></div></td>
          <td class="RowHeader"><div align="left">Account # </div></td>
          <td class="RowHeader"><div align="left">Last name</div></td>
          <td colspan="2" class="RowHeader"><div align="left">First name</div></td>
          <td class="RowHeader">Actions</td>
        </tr>
        <%
i=0
If NOT rs.EOF then
	While NOT rs.EOF
		dbID = CInt(rs("ID"))
		MemberID = Trim(rs("MemberID"))
		LastName = Trim(rs("LastName"))
		FirstName = Trim(rs("FirstName"))
		i=i+1
%>
        <tr class="RowItem">
          <td class="RowItem"><div align="left"><%=i%>.</div></td>
          <td class="RowItem"><div align="left">&nbsp;<%=MemberID%></div></td>
          <td class="RowItem">
            <div align="left">&nbsp;<%=LastName%></div></td>
          <td colspan="2" class="RowItem"><%=FirstName%></td>
          <td class="RowItem"> <input name="DeleteMember" type="button" class="DeleteButton" value="Delete" onclick="del('<%=dbID%>')" /></td>
        </tr>
        <%
		rs.MoveNext()
	Wend
Else
%>
        <tr>
          <td colspan="2" class="body-text">No members found.</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td colspan="2">&nbsp;</td>
        </tr>
<% End If %>

Open in new window

Thanks for the excellent advise worthyking1.

Learning to code rather than using DW sounds rather daunting.

Where would you say is the best place to start.

On reflection I think I had a similar situation of DW playing up some few months ago and promised my self I would get another machine. I suspect the OS or DW of this one is corrupted, the new machine arrives any day so that will be interesting as well

Thanks for you trouble

John
SOLUTION
Avatar of worthyking1
worthyking1
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Forgot to mention, at the bottom of any page that you have the include file it is a good idea to do your housekeeping by closing the connection object by calling the KillCon function with:

<% KillCon() %>
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I thank you both for all the help.

I would like to leave this thread open for a while so that I can let you know what happens with my new machine.
Not sure if I am clever enough to become a coder but it sounds very interesting and appealing.
I eventually have my PC running and creating master/detail pages went very well, that was until I tried to open the pagein DW with F12.

I was then given an error message
ADODB.Command error '800a0e7a'
Provider cannot be found. It may not be properly installed.
/lepage_bimed/Gen2Results.asp, line 9

line 8      Set rsGen2_cmd = Server.CreateObject ("ADODB.Command")
line 9      rsGen2_cmd.ActiveConnection = MM_connLepage_STRING

The connection string is as follows
Dim MM_connLepage_STRING
MM_connLepage_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\DDDDD\DDDDDD\DDDDD\glands.mdb;"
%>

I have combimation of DWcs3 and XP64bit I suspect these may not be compatible?
No, that error is all server.  Has nothing to do with DW.
Sorry Jason
I dont understand, "No, that error is all server"
Would you clarify a little for me please?
Your machine is not setup to run ASP scripts. You would need to install IIS on your machine in order to f12 preview asp pages. Makes no sense to test locally though unless you are actually on your server.  Better to upload pages to production environment and test there.
Thanks,
In fact IIS is installed.

I found this page http://forums.adobe.com/message/4160444 and it does seem that later versions of access may cause problems.
I think I eventually came to the conclusion that cs3 is not compatible with a 64 bit sytem.

This page seems to say it all and is a good reference for the future.

http://www.microsoft.com/windows/compatibility/windows-7/en-US/Search.aspx?l=en-us&type=Software&s=dreamweaver&os=64-bit.

Thanks you for being so helpful it has helped me a great deal.

Regards

John
Just to confirm I reinstalled xp32bit and DW cs3 is excellent again.
I also found I could not use access2007 with cs3 and had to revert to access2003.

To upgrade to windows7 and cs5.5 would cost over £400. these prices seem excessive for upgrades.