Results 1 to 5 of 5

Thread: Displaying fields

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Posts
    232

    Post

    SELECT field1, field10 FROM table

    ------------------
    smalig
    [email protected]
    http://vbcode.webhostme.com/


  2. #2
    Guest

    Post

    Done that already. What happened was, when I tried to edit a row of data into the data entry form, and a field present in the data entry form is not in the SELECT statement (which is a field that doesn't appear in the datagrid), an error occurs, which is:

    Unable to bind to field or datamember: <field name>

  3. #3
    Guest

    Post

    I used the SQL statement "SELECT * FROM table" to access all the fields from the database. But I don't want the other fields to show, say some less important fields which should just appear in a data entry form. HOw could I do that? thanks...

  4. #4
    Addicted Member pardede's Avatar
    Join Date
    Jan 2000
    Posts
    232

    Post

    Well, generally if you don't need to show a field, you just don't place any bound control with that field on the form, or set the visible property of this field's bound control to false to hide it, while you still can use SELECT * ...

  5. #5
    Addicted Member pardede's Avatar
    Join Date
    Jan 2000
    Posts
    232

    Post

    ... and if you are using datagrid (like DBgrid), you can hide the particular columns of the fields you want to hide, this you can do at design-time (rightclick on the grid to get it's property page) or at runtime, something like DBGrid1.Columns("field1").Visible = False

Posting Permissions

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



Click Here to Expand Forum to Full Width