1
vote
1answer
27 views

incremental export and import postgresql C#

I have a PostgreSQL Database, with one table. Each day, I want to export the data WHERE date='whatever' so it ONLY dump the data I've managed TODAY. Then, I go to another Database, and import that ...
1
vote
3answers
82 views

Manually increment values in database

I have a table structure id | col1 | col2 1 | 1 | val1 2 | 2 | val2 3 | 3 | val3 -- 4 | 4 | val4 5 | 5 | val1 6 | 6 | val6 I want to perform a delete action to delete one ...
0
votes
1answer
26 views

Postgresql multi-row insert using command parameters

I need to insert large amounts of data into postgresql using multi-row inserts. I am currently doing this by constructing the sql query using a stringbuilder and appending the values but I was ...
0
votes
5answers
74 views

Is there a way to check if one or more rows of a result set sum up to a specific value?

This is kind of a complicated question to phrase so bear with me. Let's say I have a query that return a set of integers. 2387 3357 3471 4885 5867 6170 8170 9777 12970 13190 17670 20470 160159 ...
1
vote
1answer
43 views

Return multiple PostgreSQL values in table format

Pretty much stuck on this for the past few days. I wouldn't normally post here but what I'm trying to come up with just searching on my own doesn't work. I want to query PostgreSQL and come up with ...
0
votes
1answer
30 views

Getting search_path to work with Npgsql

What is the appropriate way to set the search_path for a particular user on either the entire database or just a schema in PostgreSQL in order for it to work via Npgsql? Let's take my user reader for ...
1
vote
1answer
53 views

insert into postgresql table using c#

i have two postgreSQL tables linked by a foreign key. I want to insert into the second table the data coming from the first table primary key. I wrote that in my c# application : command1.CommandText ...
1
vote
1answer
59 views

error 42601 syntax error at or near

I'm using a c# application to load a postgresql table with appropriate data. Here is the code: NpgsqlConnection conn = new NpgsqlConnection("Server=localhost;Port=5432;UserId=postgres;Password=***** ...
-4
votes
1answer
52 views

nhibernate mapping by code troubles [closed]

I have an entity:- public class Employee{ private List<Employee> subbord = new List<Employee>(); private int id; private string surname; public virtual Employee Boss { get; set; } ...
0
votes
3answers
54 views

NHibernate - first query is painfully slow

Database table (PostgreSQL) containing 10000 rows: CREATE TABLE test ( id bigserial NOT NULL, text text, CONSTRAINT test_pkey PRIMARY KEY (id) ) Classes: public class Test { public ...
0
votes
1answer
46 views

Notify FUNCTION in PGSQL to pass column values to C#

I have a TRIGGER created in PGSQL to NOTIFY my c# app when a new ROW is created in my TABLE with a matching condition on a column value. FUNCTION to send msgfail to c#: CREATE OR REPLACE FUNCTION ...
0
votes
1answer
43 views

How do I set encoding in an NpgsqlConnection

I have a PostgreSQL database, which uses character encoding WIN1252. When querying the database, some records will produce an error when trying to read the data, because it is trying to convert it to ...
0
votes
1answer
50 views

Castle Activerecord error is “relation does not exist” on Postgresql?

ActiveRecord mape: [ActiveRecord("JobTitle",Schema="public")] public class JobTitle :ActiveRecordValidationBase<JobTitle> { [PrimaryKey(Column = "Id")] public virtual int Id { get; ...
1
vote
2answers
62 views

Error in TEXT field (PostgreSQL) - NHibernate can't read it

I have this entity: public class Product { public virtual long ID { get; set; } public virtual string Name { get; set; } public virtual string Description { get; set; } public virtual ...
3
votes
1answer
64 views

How to set InsertCommand parameter as function call?

I working on a GIS application which uses the PostgreSQL database with PostGIS extension. I already created the data access logic for entire project and everything works fine except the geometry value ...

1 2 3 4 5 16
15 30 50 per page