Dataset Wizard doen't create table adapter

Dataset Wizard doen't create table adapter

Postby jebus_jt » Sat 09 Jan 2010 22:06

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
jebus_jt
 
Posts: 9
Joined: Thu 03 Dec 2009 20:37

Postby StanislavK » Mon 11 Jan 2010 14:15

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.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby jebus_jt » Mon 11 Jan 2010 15:50

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
jebus_jt
 
Posts: 9
Joined: Thu 03 Dec 2009 20:37

Postby StanislavK » Tue 12 Jan 2010 10:09

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.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby jebus_jt » Wed 13 Jan 2010 21:05

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?
jebus_jt
 
Posts: 9
Joined: Thu 03 Dec 2009 20:37

Postby StanislavK » Thu 14 Jan 2010 11:16

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.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby jebus_jt » Thu 14 Jan 2010 15:05

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
jebus_jt
 
Posts: 9
Joined: Thu 03 Dec 2009 20:37

Postby StanislavK » Fri 15 Jan 2010 14:49

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.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby jebus_jt » Thu 21 Jan 2010 15:36

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
jebus_jt
 
Posts: 9
Joined: Thu 03 Dec 2009 20:37


Return to dotConnect for PostgreSQL