Exception filling dataset

  • Thread starter Thread starter Tomaz Koritnik
  • Start date Start date
T

Tomaz Koritnik

Hi

I'm learning ADO.NET and I have strange problem. I have Oracle 8.17 localy
installed and I created a simple table called mytable. In VS.NET, C# 2002 I
added OleDbDataAdapter component and used "Configure DataAdapter" to create
connection and configure it. SQL statement is just a simple "select * from
mytable". Then, I used OleDbDataAdapter (by right clicking on it) to create
a dataset and I've put data grid on form and assigned dataset.mytable as
datagrid's data source. If I right-click on OleDbDataAdapter and select
PreviewData I can see my table, but when I run application nothing is shown.
In tutorial It was written that I have to manually call
OleDbDataAdapter.Fill but on the call to Fill, application throws "An
unhandled exception of type 'System.Data.OleDbException' occured in
system.data.dll". If I don't use visual components and create
OleDbDataAdapter, OleDbConnection and DataSet in code, all works fine. What
am I doing wrong and what's the difference? Please tell me if you need more
info about my problem.

regards
Tomaz
 
Back
Top