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
views and dataset
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):
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
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
perhaps we can use the PgSqlDataAdapter with Text and Parameters ??
thanks
dataset and views
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...".
If you need the same at design-time you can use verbs "Configure DataAdapter", "Fill Dataset...".