Viewing data from dataview

  • Thread starter Thread starter ReidarT
  • Start date Start date
R

ReidarT

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.DataBindings.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.SqlClient.SqlException' occurred
in system.data.dll

regards
reidarT
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top