Page 1 of 1
views and dataset
Posted: Wed 15 Dec 2004 14:57
by guest
hi,
i have a problem with views and datasets. if a take a view in the data adapter i get no data in the dataset.
what' wrong ?
thanks!
views and dataset
Posted: Thu 16 Dec 2004 15:33
by Yuri
Please send us a code sample and sql script to reproduce the problem.
See example of working with dataadapter (PostgreSQLDirect.NET 1.85.3, PostgreSQL 7.4.2):
Code: Select all
C#:
PgSqlConnection connection = new PgSqlConnection("host=server;user id=postgres;database=test;");
connection.Open();
PgSqlDataAdapter da = new PgSqlDataAdapter("SELECT * from \"testView\"", connection);
System.Data.DataTable data = new System.Data.DataTable();
da.Fill(data);
SQL:
CREATE OR REPLACE VIEW "testView" AS
SELECT emp.ename, dept.dname, emp.job FROM emp, dept WHERE dept.deptno = emp.deptno;
dataset and views
Posted: Tue 28 Dec 2004 13:00
by guest
it works, but is their a way to do the same in a graphical way.
perhaps we can use the PgSqlDataAdapter with Text and Parameters ??
thanks
dataset and views
Posted: Wed 29 Dec 2004 15:43
by Yuri
If you would like to reflect data at the form please see our demo project DataSet and read MSDN about data binding.
If you need the same at design-time you can use verbs "Configure DataAdapter", "Fill Dataset...".