Tagged Questions
1
vote
0answers
52 views
Update and delete queries in a transaction [on hold]
I have two queries (update and delete) in a transaction. The queries are open queries. I am using SQL server to connect to postgresql by creating a linked server.
here is my code:
cn_pg.Open();
...
0
votes
1answer
49 views
connect with postgresql and use query
I want to connect to a postgresql database and use an insert query.
I have done some research but i have no clue what i am doing.
So i don't even know if i am connected with the postgresql.
here is ...
0
votes
0answers
30 views
Running batch script from windows service to dump database
I have a .cmd file with content:
pg_dump -h localhost -p 5432 -U postgres --create --format=plain --encoding=UTF8 --file="D:\temp.snapshot.sql" database_name
That script runs from CMD well without ...
0
votes
1answer
63 views
C# OdbcDataReader.GetBoolean InvalidCastException In IF-Statement
Please forgive my broken English first.
Well,antiduh's method of debug helps me to know what happen on my code,thanks everyone who join discuss.
When I use OdbcDataReader.GetBoolean single,it's OK ...
0
votes
0answers
37 views
Connecting ado.net Entity data model to postgresql database
I'm new to C#, ado.net and visual studio 2012, just to make that clear from the beginning.
I'm trying to connect an ADO.NET Entity Data Model to a postgresql database.
I tell VS to 'generate mdoel ...
0
votes
2answers
57 views
The type initializer for 'NHibernate.Cfg.Configuration' threw an exception. Unit Testing
I have UnitTesting project with one TestMethod which calls repository and repository creates new record in PostgreSQL
When I run this test its throws exception:
Message: The type initializer for ...
0
votes
1answer
37 views
Double saved as int in PostgreSql Database using CASE-WHEN
I have a problem updating a table. The number 3,25 is saved as 325. This happens only if i use this UPDATE:
using(var con = new Npgsql.NpgsqlConnection(constr))
{
var UpdCmd = "UPDATE ...
0
votes
1answer
41 views
SSL errors when using Npgsql and SSL certificate authentication
I'm having trouble establishing a connection to a PostgreSQL database that is configured only to accept a valid SSL certificate. I can connect using pgAdmin III with the appropriate certificate and ...
1
vote
1answer
40 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
87 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
35 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
76 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
60 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
46 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
82 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 ...