Skip to main content
Participant
May 29, 2009
Answered

Some dynamic fields are blank? (ASP)

  • May 29, 2009
  • 2 replies
  • 1018 views

I'm new to Dreamweaver and I am composing a fairly straightforward set of pages that search, insert, display and report on a table in SQL express database. Everything was going OK until I got to the 'report' bit. What I have is a page where a number is entered (the unique reference number for the table record) and this number is used to filter the recordset for one specific record. All fields of this recordset are then displayed in a table form, ready for printing. There are around 30 fields which need to be displayed.

I got the recordset filter working fine and I populated the table cells with the recordset fields (merely dragged each one from the bindings form into the cell that was appropriate). On testing this I found that around half of the fields displayed exactly as I would expect but roughly half of the fields were blank. I thought this was odd so I double checked my SQL table to make sure there was data in the field. The data was fine and no different (in variable type and length etc) to some of the fields that were displaying correctly. So I removed the fields and re-added them (thinking it was 'just one of those things') but the problem persisted. So I took the drastic action of creating a second page with a table and entering the same fields on it. Same problem with the same fields. So I swapped the position of one of the problem fields with a working field. The problem followed the field so it's not a table cell problem.

Now I'm just baffled. Please trust me that there is proper data in this field (which I can see clearly when do a recordset filter test on Dreamweaver).

I would be really grateful if anyone has any ideas that I could try.

Thanks.

This topic has been closed for replies.
Correct answer

I would usually ask if any of your data types are TEXT or NTEXT, but varchar(max) may also behave the same. Move them all to the end of your select statement, and see if that works. You may find that only one of these fields display. If this is the case, you may need more than one recordset to get these extra fields out of the database.

Dooza

2 replies

Correct answer
June 2, 2009

I would usually ask if any of your data types are TEXT or NTEXT, but varchar(max) may also behave the same. Move them all to the end of your select statement, and see if that works. You may find that only one of these fields display. If this is the case, you may need more than one recordset to get these extra fields out of the database.

Dooza

Participant
June 2, 2009

Thanks Dooza. That seems to do the trick - I had to limit the first recordset to roughly the first half of the fields and make a new recordset for the rest. All the fields are now displaying correctly. Is there a good SQL reason for this behaviour or is this something that is a Dreamweaver thing?

June 2, 2009

Its an SQL thing, the datatypes you have chosen aren't stored in the table, even though it looks like it is. The data is in a different file on the SQL server, so should only be retrieved after all the others, as it can't go back to the table. I wish I had a better explanation for it, I have run into it many times over the years, and kinda understand it, but not 100%.

Dooza

David_Powers
Inspiring
June 1, 2009

Thread moved to the Dreamweaver Application Development forum.