Various problems with strongly typed DataSets in Visual Studio 2005

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
richard
Posts: 11
Joined: Tue 05 Sep 2006 14:53
Location: Full
Contact:

Various problems with strongly typed DataSets in Visual Studio 2005

Post by richard » Wed 24 Jan 2007 16:39

I am trying to create strongly typed DataSets for use in my application. Here are the steps I am following, based on the tutorials found at

http://www.asp.net/learn/dataaccess/def ... x?tabid=63

- Data -> Add new data source
- Choose Database
- Select connection string
- Select View
- Configuring Insert/Delete/Update commands...
- Select StoredProcedure CommandType
- Select the stored procedure from the CommandText dropdown
Error:
Failed to regenerate parameters with the new command Text:delete_item
Object reference not set to an instance of an object.
The command text will still be set.
- Click OK.
- Now I have to manually configure the parameters of the stored procedure.

So far, this is annoying but I can make it work. Now I'd like to add new queries to the TableAdapter.

- Add Query
- Use existing stored procedure.
- Select the stored proc from the dropdown list.
- Dialog disappears - no query is added.

Try again with a SQL statement and appears to work.

So it seems like there is an issue with parameter discovery.

Another question I have concerns what seems to be duplicate functionality in Tools->PostgreSQL->DataSet Wizard...

Why is this necessary and why doesn't it work properly anyway? I get some warning about "No Form Designer selected" which I ignore.

Sometimes selecting an existing DataSet will fail with some non-descriptive error, but let's look at the New DataSet option.

On the "Setup individual data tables" page of the wizard, both the Configure and Preview Data button produce an "Object reference not set to an instance of an object" error.

Moving on... using this other DataSet creation wizard at least can automatically generate the Insert/Update/Delete commands, but does nothing to help with the aforementioned query builder problem with stored procedures.

Any help would appreciated.[/b]

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 25 Jan 2007 07:45

- Data -> Add new data source
- Choose Database
- Select connection string
- Select View
- Configuring Insert/Delete/Update commands...
- Select StoredProcedure CommandType
- Select the stored procedure from the CommandText dropdown
What is meant by "- Configuring Insert/Delete/Update commands..."? There is no such option after selecting a view. Please clarify.
I get some warning about "No Form Designer selected" which I ignore.
This message warns you that you will not be able to add your newly created dataset to a form.
Provide us with your database objects definitions.

richard
Posts: 11
Joined: Tue 05 Sep 2006 14:53
Location: Full
Contact:

Post by richard » Thu 25 Jan 2007 14:39

I'll add a little more detail...

- Data -> Add new data source
- Choose Database
- Select connection string
- Select View, click Finish.

In the DataSet designer, select the table adapter and in the Properties window...

- Configure any of the Insert/Delete/Update commands... (these have not been generated automatically with SQL commands)
- Select the DeleteCommand drop down and choose New.
- Change CommandType to StoredProcedure
- Select any stored procedure from the CommandText dropdown

Then you get the error as described in my original post and no parameters have been detected and created. This has to be done manually.

I should also note that the driver works fine when using Enterprise Library using the same database tables. I never understood the whole parameter discovery feature enough to test the driver with that, but calling stored procedures works fine.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 25 Jan 2007 15:13

Insert/Delete/Update commands are not to be generated for views (data provider for SQL Server doesn't generate the m either).
Regarding parameter generating we will investigate this problem. Look forward to hearing from us soon.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 09 Feb 2007 09:42

We have fixed this problem.
Look forward to the next build.

richard
Posts: 11
Joined: Tue 05 Sep 2006 14:53
Location: Full
Contact:

When is the new build going to be available?

Post by richard » Wed 28 Feb 2007 14:33

I am looking forward to the next build. When will it be made available?

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 01 Mar 2007 13:16

We are going to make it available in the beginning of the next week.

Post Reply