Page 1 of 1

bigserial data type working weird in pgsqldataadpter

Posted: Tue 20 Nov 2007 06:10
by aspirevishal
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

Fixed

Posted: Tue 20 Nov 2007 16:42
by SecureGen
We have fixed this problem for you.
Look forward to the next build.

Not fixed

Posted: Wed 21 Nov 2007 09:00
by aspirevishal
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.

Posted: Wed 21 Nov 2007 10:09
by SecureGen
Please use code PgSqlDataAdapter1.Fill(DataSet11, "Table"), because the name "Table" is being used in TableMappings.

Error

Posted: Wed 21 Nov 2007 12:19
by aspirevishal
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.

Posted: Wed 21 Nov 2007 13:03
by SecureGen
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.