Page 1 of 1

Dataset Wizard doen't create table adapter

Posted: Sat 09 Jan 2010 22:06
by jebus_jt
hi, I've a problem with the Dataset Wizard, well I'm not sure if is a problem but maybe someone can helpe figure out.

Ok, so in the Dataset Wizard I setup an individual data table manually that means I clicked on the "Add" button, then I wrote the SQL query:

select * from estudiantes
INNER JOIN personas
ON personas.ID = estudiantes.ID

then I save the changes, I mean Next, Next, Next...so when I open the dataset it has no tableadapter, so there is no select method to choose from in the objectdatasource object...is this an issue or im doing it wrong, I really need that query to be executed and of course I need to see the data...please help

thanks in advance

Posted: Mon 11 Jan 2010 14:15
by StanislavK
There is a number of ways to retrieve the data using typed DataSets. For example, you can fill the DataSet generated by the Fill() method and then use its tables as data sources, e.g., bind them to the grids.

As for TableAdapters, you can generate them using Microsoft TableAdapter Configuration Wizard in the DataSet Designer. At the moment, there is no support for the TableAdapter class generation while using Devart DataSet Wizard. We plan to implement it, but cannot provide any timeframe.

Posted: Mon 11 Jan 2010 15:50
by jebus_jt
ok thanks... the problem is that there is no fill() method so I can't use it that way.. I'll try doing it by code...thanks

Posted: Tue 12 Jan 2010 10:09
by StanislavK
The DataSet instance should have the Fill() method. I.e., if you generate typed DataSet, say PgDataSet, with Devart DataSet Wizard and then place its instance pgDataSet1 onto a form, you can fetch the data using the pgDataSet1.Fill() method.

Posted: Wed 13 Jan 2010 21:05
by jebus_jt
hehe the problem is that I'm developing a web application, and with the Dataset Wizard I create obviously the Datasets, but with that query it doesn't create a tableadapter so there is no fill() method...or, am I missing something?

Posted: Thu 14 Jan 2010 11:16
by StanislavK
Assume that you have created a typed DataSet PgDataSet. You can use its instance as follows:

Code: Select all

PgDataSet pgDataSet1 = new PgDataSet();
pgDataSet1.Fill();
GridView1.DataSource = pgDataSet1.Tables[0];
GridView1.DataBind();
where GridView1 is a grid control on your web page.

Also, I've sent a sample project to the email you have provided in your forum profile.

Posted: Thu 14 Jan 2010 15:05
by jebus_jt
Thank you so much for your help, but it seems it doesn't work. I'll make a video showing you how I did it. Sorry for bothering you, I'll post the URL of the video in a couple hours.

Thanks in advance

Posted: Fri 15 Jan 2010 14:49
by StanislavK
Please ensure that you properly set the PgSqlConnection objects up in PgDataSet.xsd and PgDataSet.Designer.cs. Also, the sample needs the table DEPT to be created in your PostgreSQL database. It can be done with this script:

Code: Select all

CREATE TABLE DEPT (
  DEPTNO INT PRIMARY KEY,
  DNAME VARCHAR(14),
  LOC VARCHAR(13)
);
See also tables.sql script in the samples for dotConnect for PostgreSQL.

Posted: Thu 21 Jan 2010 15:36
by jebus_jt
thank you for your help, I've been busy these days so I couldn't post the video, anyway I tried again and now it works...I've no clue what was wrong...again,thanks for your help