Results 1 to 4 of 4

Thread: Missing Field

  1. #1
    Join Date
    Nov 2004
    Posts
    7
    Rep Power
    0

    Question Missing Field

    I have a View Created in SQL Server 7.0 that joins about 8 tables. When I browse the view I am able to see all the fields.

    But When I try Selecting Data from the View using asp two of the fields are not being displayed. I tried displaying all the field names from the list but the fields are not being displayed in the list, so apparantly the fields are accessible why is that.

    The query is as follows:

    SelInfo = "Select * from EmdData where staff_number='"&strEmployee_no&"'"


    The fields I am trying to access are ; emplevel & emplevelid

    Any help would be greatly appreciated

  2. #2
    Join Date
    Mar 2004
    Posts
    123
    Rep Power
    0

    Default Re: Missing Field

    Did you execute the view in MSSQL and see if it worked first?
    There is no wrong or right, only consequencies to action

    "It is the duty of man to make his knowledge so complete in life, so as to make it impossible for any other to take advantage of him" - Marcus Garvey

  3. #3
    Join Date
    Apr 2003
    Posts
    13,269
    Rep Power
    34

    Default Re: Missing Field

    Is staff_number a text or integer field? If it is an integer field you need to remove the single quotes from around the strEmployee_no variable.

    Code:
    SelInfo = "Select * from EmdData where staff_number=" & strEmployee_no
    "The best software is the one that fits your needs." - A_A

    Virus free since: date unknown
    Anti-virus free since: August 2008

  4. #4
    Join Date
    Nov 2004
    Posts
    7
    Rep Power
    0

    Default Re: Missing Field

    The Problem is not with the where clause because I printed out the SQL in the browser and executed it in Query Analyzer and it returned all the fields the.

    The problem is with the "empLevel" and "empLevelid" fields

Posting Permissions

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