Viewing data from dataview

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ReidarT

    #1

    Viewing data from dataview

    I use a dataview to view records from an sql-database in a windows-form.
    When I use a select statement from a table like SELECT * FROM Table1 it
    works ok.
    objDataAdapter. Fill(objDataSet , "Table1")
    I fill the field in the form with
    txtFieldName.Da taBindings.Add( "Text", objDataView, "FieldName" )

    When I change the select-statement to get fields from 2 or more tables like
    SELECT Table1.*, Table2.Field2, Table2.Field3 FROM Table1 LEFT OUTER
    JOIN....
    it fails and says
    An unhandled exception of type 'System.Data.Sq lClient.SqlExce ption' occurred
    in system.data.dll

    regards
    reidarT


  • Cor Ligthert

    #2
    Re: Viewing data from dataview

    Reidar,

    A funny message, you say Viewing data from a dataview, and than we see only
    that you in past have used a dataview to show records in a window form.


    However, what has that to do with your previous message which seems to stop
    far before the data is able to use the dataview?

    What you have now is probably a select error. If you take the same (not
    academically right) methods as me and remove some words out that SQL
    statement until it is working and start than adding again to that until it
    works as wished than you would in my opinion be able to solve that.

    I hope this helps,

    Cor


    Comment

    Working...