bigserial data type working weird in pgsqldataadpter

bigserial data type working weird in pgsqldataadpter

Postby aspirevishal » Tue 20 Nov 2007 06:10

Have any of you tried the pgsqldataadapter wizard with one of your column as bigserial , primary key.

I believe pgsqldataadapter is broken try this small test
1. Create a table test_serial in any of your existing database
Code: Select all
create table test_serial(id bigserial primary key not null, name varchar(30)); 
insert into test_serial(name) values('jony');
insert into test_serial(name) values('jony2');
insert into test_serial(name) values('jony3');

2. Now on a new form for VB.net drop a datagrid view
3. run the wizard for pgsqldataadapter create a connection / use exixting one and select all the colums for the test_serial on the bottom right drop down make sure you select dataadapter
4. On the next step Rename the columns to what you want to display on datagrid like No for id and Name for name.
5.Generate and add the component to the current form
6. In load event (Double click on form) of the form write
Code: Select all
pgsqldataadapter1.fill(dataset11,"temp_table")

Or
pgsqldataadapter1 change to your dataadapter name on form
dataset11 change to your dataset


build and execute the form ,

Did you see the data in the grid

NO

Please report this back. I am struggling with this problem.

Using VB.net2005 sp1
PgSQLDirect 3.25.20.0
aspirevishal
 
Posts: 30
Joined: Fri 31 Aug 2007 03:30
Location: India

Fixed

Postby SecureGen » Tue 20 Nov 2007 16:42

We have fixed this problem for you.
Look forward to the next build.
SecureGen
Devart Team
 
Posts: 133
Joined: Thu 08 Sep 2005 06:27

Not fixed

Postby aspirevishal » Wed 21 Nov 2007 09:00

I downloaded the latest build 3.25.21

Un-installed the old version 3.25.20 restarted the system
Installed 3.25.21 , Created a new form created a new datagrid did the above process but it still does the same.


People can you confirm that you also get the same problem on the latest build.
Last edited by aspirevishal on Wed 21 Nov 2007 12:24, edited 1 time in total.
aspirevishal
 
Posts: 30
Joined: Fri 31 Aug 2007 03:30
Location: India

Postby SecureGen » Wed 21 Nov 2007 10:09

Please use code PgSqlDataAdapter1.Fill(DataSet11, "Table"), because the name "Table" is being used in TableMappings.
SecureGen
Devart Team
 
Posts: 133
Joined: Thu 08 Sep 2005 06:27

Error

Postby aspirevishal » Wed 21 Nov 2007 12:19

And I thought it was
Table = Name of the Table from which that data is created as you do in oledbdataadapter

Can I change that keyword Table to something else ?

Thanks for correcting me !

Anyway finally my project would be rolling for next build. Hope so I don't come across similar bottle neck

Also would like to know where in documentation is the above mentioned.
aspirevishal
 
Posts: 30
Joined: Fri 31 Aug 2007 03:30
Location: India

Postby SecureGen » Wed 21 Nov 2007 13:03

This is the standard way of forming SourceTable for TableMapping in DataAdapter.
You can change it in run time as follows:
pgSqlDataAdapter1.TableMappings[0].SourceTable = "test";
You can also change the name in DataAdapter's serialization code.
SecureGen
Devart Team
 
Posts: 133
Joined: Thu 08 Sep 2005 06:27


Return to dotConnect for PostgreSQL