Unanswered: Small but nagging problem (about an ADO recordset & a databound control)
I develop a sample HTM page to display a recordset from an SQL DB called "Chateau" (The sample DB that comes with the MS Visual InterDev 6.0 study guide). The recordset get its table from a DataEnvironment command that looks like "SELECT DISTINCT Type, Rate FROM dbo.Rooms" which gives the following table:
Luxury Suite 225.0000
And there's a design time listbox control bound to this recordset whose properties are set to display the "TYPE" field of this recordset.
But... When I test the HTM page in the brwoser, this listbox (style: dropdown combo) control shows nothing from the recordset but just an empty dropdown list.
The settings for the DataEnvironment must be OK as all of the attributes of the DB are correctly displayed in the DE subfolders or the Dataview window folders (DSN setup or the SQL setup seem OK)
The problem, as far as I guess, stems from the data binding between the recordset and the listbox control or from the recordset itself.
I cannot solve this problem. What must I do? Thanks for your suggestions.
The browser I use is I.E. 6.0.
When I try other Design Time Controls such as Label or TextBox the result is the same: No data from the table. The recordset control seems to have no function at all. I cannot test which element fails.
Possibly... but I don't give that a chance because there's no code to close the recordset. In fact, in the whole process there's no code.
The making of this page is explained in a sample on the page 226 of the MS Press' book called "Web Applications with MS VI6.0"
In that book that statement is written:
"Open the Reservation.htm file for editing and drag a Recordset control and a Listbox Design Time control onto the reservation page"
Doesn't that mean that DTC can be placed on a HTML page? Yes it does.
So then, why, when I apply what's written on the book, and place DTC 's on Reservation.htm page to retrieve data from a recordset that's tied to a DB table, the DTC (here a drop down list box) doesn't it get data from the recordset?
It seems, it just doesn't work on an HTM page
But now comes the interesting part:
When I put the same DTC's on an ASP page, they work!
They work just as they are supposed to: Without wrtinig a single code and by simply adjusting the DTC's ( a dropdown listbox and a recordset) attriubutes.
So, is the book wrong or am I omitting something on my part? The book clearly says "put the DTC on the HTM page"
So I may be missing something, don't know what.
Question Title: DTC control in HTML page
I am practicing with VI demo database"Chateau" to display ListBox DTC control in HTML page named reservation. I already enable client-side scripting model,However, When I browsed page in IE5.0 , I found nothing in LIstBox although I made all settings. IF I use ListBox in ASP page with same setting, it can show bound data from recordset without problems. I do not know why. Because, I was told that DTC control can also be used in HTML page. Who can help me for this issue? Thanks in advance!
But though it was posted in July 2003 no one had replied it.
I use I.E. 6.0 and again with the client-side scripting enabled.