Get data from a library in DB2 (AS400)

Feb 8 2016 3:25 AM
Dear All
 
please i need help to get data from a library in DB2 (AS400) named QSBD.INVW
but there error in my sql query
that is my code
//////////////////////////////////////////////////////////////////////////////////////////////////////// 
string path = "Provider=IBMDA400;Data Source=192.168.1.2;User ID=user;Password=password";
string query = "SELECT * FROM QSBD.INVW";
DataTable dt = new DataTable();
OleDbConnection connection = new OleDbConnection(path);
OleDbDataAdapter dAdapter = new OleDbDataAdapter(query, connection);
connection.Open();
OleDbCommandBuilder cBuilder = new OleDbCommandBuilder(dAdapter);
dAdapter.Fill(dt);
connection.Close();
BindingSource bSource = new BindingSource();
bSource.DataSource = dAdapter;
dataGridView1.DataSource = bSource;
this.Refresh();
//////////////////////////////////////////////////////////////////////////////////////////////////////
 
 
 
 the program stops at "dAdapter.Fill(dt);" and gives error "SQL0204: INVW in QSBD type *FILE not found."
please how can i solve this problem. 
 
 

Answers (2)