Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2003

    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:

    Double 125.0000
    Luxury Suite 225.0000
    Penthouse 325.0000
    Single 75.0000
    Suite 175.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.
    Last edited by revivo; 11-29-03 at 21:18.

  2. #2
    Join Date
    Feb 2002
    What browser (and version) are you using ?

  3. #3
    Join Date
    Nov 2003
    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.

  4. #4
    Join Date
    Nov 2003
    You might be closing recordset, since it is bound to listbox keep it open.

  5. #5
    Join Date
    Nov 2003
    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.

    Thanks in advance for your suggestions.

  6. #6
    Join Date
    Nov 2003
    The sample I was talking about can be found here:

    [Integrating ASP with Databases using ADO]

    And, the problem I had is defined also by another person at Here's an excerpt from that site:

    Question Title: DTC control in HTML page
    Author: stoneshi
    Date: 07/23/2003

    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.

    What's wrong with it I still don't understand.

    I wait for all kind of suggestions. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts