multi-dimension array as parameter

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
Posts: 1
Joined: Fri 23 Apr 2010 10:38

multi-dimension array as parameter

Post by kengie » Fri 23 Apr 2010 10:45


I have a question about your product.

We currently have lots of functions in our existing postgresql database. And we would like to re use these functions.

From your dotConnect for PostgreSQL product, can you support array or multi-dimension array as a parameter for a function?

Sample SQL:
select public.save_coord('E',
'{{"TC",0,"ABC","ABC",0,1,2009-03-16 12:24:35,"ABC",2009-03-28 13:50:56,"ABC",1900-01-01 00:00:00,"ABC","Mkhtaw==","Mkhtaw==",1}}' ,
{"TC",1,1,"S0013","622",1900-01-01 ,0},
{"TC",2,1,"S0016","622B",1900-01-01 ,0},
{"TC",3,1,"S0001","HQ",1900-01-01 ,0},
{"TC",4,1,"S0002","808",1900-01-01 ,0},
{"TC",5,1,"S0019","808B",1900-01-01 ,0},{"TC",6,1,"S0014","813",1900-01-01 ,0},{"TC",7,1,"S0015","813B",1900-01-01 ,0},{"TC",8,1,"S0012","A1",1900-01-01 ,0},{"TC",9,1,"S0017","A1B",1900-01-01 ,0},{"TC",10,1,"S0020","276",1900-01-01 ,0},{"TC",11,1,"S0021","276B",1900-01-01 ,0},{"TC",12,1,"S0011","G05",1900-01-01 ,0},{"TC",13,1,"S0018","G05B",1900-01-01 ,0},{"TC",14,1,"S0010","PEAK",1900-01-01 ,0},{"TC",15,1,"S0004","PEAKB",1900-01-01 ,0},{"TC",16,0,"S0022","7116",1900-01-01 ,0},{"TC",17,0,"S0023","7116B",1900-01-01 ,0},{"TC",18,0,"S0024","HQ2",1900-01-01 ,0},{"TC",19,1,"S0025","TEST1",1900-01-01 ,0},{"TC",20,1,"S0026","TEST2",1900-01-01 ,0},{"TC",21,1,"S0027","TEST3",1900-01-01 ,0},{"TC",22,0,"S0028","TEST5",1900-01-01 ,0}
},' )

If can, how to do it? As using the expression edition of the dotconnect and with the ExecuteReader but it has exception.

Thank you for your time.


Posts: 27
Joined: Tue 19 Jan 2010 13:52

Post by migle » Sun 25 Apr 2010 08:16


I'm not affiliated with Devart, but we also use arrays as parameters.
Be sure to read the following page about using parameters and stored procedures: ... eters.html

For arrays, you just have to use type PgSqlType.Array, and put PgSqlArray structures on the parameter value. Also, look for the help on PgSqlArray under Structs, not under Classes.


Post Reply