0
votes
0answers
21 views

Npgsql returning no result and PgAdmin does

I have an issue with Npgsql.dll. The code below returns me no results. If I take the sqlString and paste it into PgAdmin after the parameters has been added, then I get the correct result. // ...
0
votes
2answers
31 views

Select certain data and insert them

I have a database in SQL Server 2008 and another similar database in Postgres. I am planning to develop one windows application using C# that will select 100 rows of data from TableA of SQL Server and ...
2
votes
1answer
75 views

Entity Framework 6 with Npgsql

I want to use Entity Framework 6 with PostgreSQL in ASP.NET MVC 4 project. I got Entity Framework 6.0.2 + Npgsql 2.0.14.3, but I get error. How do I fix this? Error: An exception of type ...
0
votes
0answers
19 views

How to retrieve notice/warning from trigger in postgres with npgsql.net library?

I am trying to retrieve a warning or notice thrown by a trigger in c# client code using npgsql.net library. How can I accomplish that? I know that in the case of error an exception is thrown but what ...
0
votes
0answers
50 views

EF6 Migrations with Npgsql get DbProviderServices error

I'm trying to test the Entity Framework 6 migrations with Npgsql 2.0.14.3 to complete the support of my opensource PostgreSqlMigrationSqlGenerator library that allow to use EF Migrations with ...
0
votes
1answer
28 views

Problems with DSN connection (Win64 app to a 32Bit Postgres Server)

I'm having trouble with the following: We have a 32bit Postgres Server here in the office. I'm developing an application in Visual Studio 2013, in a 64bits Windows 8. When I run the application, I ...
1
vote
0answers
46 views

DataReader returning null result, whilst executing the same query in PgAdmin gives back results

I'm trying to execute a query: select d1.rtime, d2.rtime, (d2.time_on_auto - d1.time_on_auto) as delta1, (d2.time_on_zal - d1.time_on_zal) as delta2 from (select * from ...
1
vote
1answer
31 views

Function to add to bytea blob in postgresql

I'm loading a large amount of files (binary data) into a Postgres database (the files being stored as blobs in the db). One way I found was to use Large Objects, which works nicely. However, for ...
0
votes
1answer
32 views

Unable to cast object of type 'Npgsql.Forward Only DataReader' to type 'Object'

I am getting following error when trying to insert data into list. "Unable to cast object of type 'Npgsql.Forward Only DataReader' to type 'object'" here is my code.RDLCReportBase is my base class ...
0
votes
0answers
34 views

NHibernate ignores custom naming strategy, ModelMapper events are not fired

I'm new in NHibernate. I've read a lot of articles about NHibernate maping by code and configuring NHibernate itself. Here is the code, which builds ISessionFactory namespace Teoria.DK.NH { using ...
0
votes
2answers
45 views

Convert From Decimal to BigInt (6 character precision)

I am consuming a web service in C# and inserting the records into a postgres database via the Npgsql library. I have a cost field that the web service gives me as a decimal type "12.57" my postgres ...
0
votes
1answer
48 views

Npgsql Error With Column

I have a Model and have the same database table. Both are synchronized. I have another database at some other server and I am ussing the same model for it but different dbContext. My system what it ...
1
vote
0answers
202 views

How to integreate PostgreSql with EntityFramework 6.0.2?

I am receiving following error The 'Instance' member of the Entity Framework provider type 'Npgsql.NpgsqlServices, Npgsql, Version=2.0.14.2, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7' ...
0
votes
0answers
50 views

A strategy for user-verified persistence using .NET MVC & NHibernate

In a mechanism for importing Excel data, where each row translates to a graph of business objects in the application model, via a dedicated UI component, we would like to make so that the user ...
0
votes
0answers
18 views

How to exclude certain fields from being loaded to a POCO by Simple.Data FindAllBy?

I have a table I want to query with Simple.Data FindAllBy() and load it into a POCO. However, there is one field in the table with binary data that I want to be excluded from this query. How can I ...
0
votes
1answer
35 views

NpgsqlDataReader - distinguish null value from “NULL” literal

I have a problem with distinguishing NULL database type from "NULL" text when reading a table column from database Sample code: using (var connection = new NpgsqlConnection("connectionString")) { ...
0
votes
1answer
95 views

String.Replace() special characters in sql query performance

I am working in postgresql 8.4. I need to insert big amount of texts 2kb each.In order to build a query i have to replace special characters like ' with ''.Now iam doing string.Format("INSERT INTO ...
0
votes
1answer
39 views

Can I extract postgresql stored procedure metadata with c#

I want to pass a string containing stored procedure name and retrieve (the metadata) the parameters of that procedure (and/or the body if possible) using c# (the Npgsql dot net provider required) ...
4
votes
2answers
585 views

Using npgsql 12 and ef 6 together - have anyone succeeded with it?

I'm trying to create a small POC for my boss about the hybrid of npgsql 12 and ef6, created a new project on visual studio created a sample database created the corresponding classes and the dbcontext ...
0
votes
1answer
135 views

Inserting a duplicate record using Npgsql

I'm trying to insert data into the following table using the Npgsql ADO.NET provider: CREATE SCHEMA core; CREATE TABLE core.config( name TEXT NOT NULL, value TEXT NOT NULL, CONSTRAINT ...
1
vote
1answer
54 views

Connecting to a Postgres database using Windows Phone 8

I've got a remote database (specifically, PostgreSQL) that I need to connect to and do work on from Windows Phone 8. I tried installing npgsql.dll in my solution for the project, but as it turns out, ...
0
votes
1answer
112 views

How to get Bytea Data in string from Postgres Database

Is there a way to get the actual encoded string saved in the Database of column with DataType Bytea.Because when the record is fetched in C# it returns as System.Byte[] which i don't want. I want the ...
0
votes
2answers
66 views

Generate .NET DataSet file from a query?

I use a Postgres database for my backend for multiple web applications. These applications are hosted on a third party server that I have limited access to. I currently use npgsql and nhibernate for ...
2
votes
1answer
86 views

How to select binary data from postgres column

I am.programming an.application in which i am selecting data from postgres database and table name cards. In.cards we have many columns but two.columns are bytea datatype. It has a blob saved ...
0
votes
1answer
59 views

Server library could not be loaded and the dynamic link library LIBPQ.dll

Please i have a serious problem here. When i want to debug my application in visual studio i have this message box error : "The ordinal 133 could not be located in the dynamic link library ...
0
votes
1answer
66 views

Using non-latin characters in connection string UserID for PostgreSQL

I have a project in C# using DavArt dotConnector to connect to PostgreSQL database. In database I can add role to use it in connection string. CREATE ROLE "Z111222333"; ALTER ROLE "Z111222333" ...
0
votes
3answers
69 views

Read a (bad?) id field in hibernate/ nhibernate

I am writing to a database log for my application. One of the fields in the table is userprofile_id which references a username. This is a nullable field, as some stuff gets written to the log ...
0
votes
1answer
61 views

Return Data Row after Insert with ODBC

I am trying to figure out how to return row from an insert command using c# and ODBC when updating a postgresql database. The table I'm inserting into has a user_id field that uses a sequence to ...
0
votes
1answer
87 views

Connection to PostgreSQL DB failure

I am currently working on a 3.5 .NET C# Project. it uses an external program that takes an argument when I build and run it. The external program goes to index a structured or an unstructured source ...
0
votes
2answers
83 views

Using EF with database first on a remote and secured database

I am wondering if it's possible to use Entity Framework to scan a database and build an EDMX model in the following scenario: (It's actually a PostgreSQL database and I'll probably use dotConnect, ...
1
vote
0answers
118 views

How can I get output values into output parameters?

I am using C# in VS 2008 to retrieve data from a PostgreSQL stored procedure that has two input parameters and two output parameters. When I created the procedure, PostgreSQL told me that I had to ...
0
votes
2answers
416 views

What chars represents new line in postgresql?

I exported data from mySQL and imported them to PostgreSQL. Everything went fine except one thing. Lots of text fields in mySQL had newline in it and now they are imported in PostgreSQL as \r\n. ...
1
vote
3answers
159 views

Postgresql/npgsql cant write when useing danish letters

I get this error when i try to write to my postgresql DB. NpgsqlException: ERROR: 22021: invalid byte sequence for encoding "UTF8": 0xe5 0x27 0x2c It only happen when i use danish letters (æ ø ...
1
vote
1answer
80 views

Analyzing, pre-processing, or post-processing of a log file

I'm trying to do some data mining on log file. It's a flat file that has a massive list of events per line. The file itself can reach upwards of 500MB as well. Each line is a comma-separated variable ...
1
vote
1answer
83 views

NpgsqlProvider and ExecuteStoreQuery

using npgsql provider and entityframework i am trying to write a simple ExecuteStoreQuery like this : var result = BusinessContextManager.Instance.ExecuteQuery(x => ...
1
vote
1answer
367 views

Delete multiple rows in PostgreSQL with Entity Framework using WHERE IN clause

I have a postgresql database and what I am trying to do is remove a bunch of rows from a table in as few queries as possible. So looping is not a good option. I am using NPGSQL for the postgres ...
0
votes
1answer
55 views

how to add constraint dynamically in postgresql table using c#

I am cloning database table in postgresql using c#.now I also want to add constraints to newly created table. can anyone suggest way to add constraints dynamically? I want to add all constraints ...
2
votes
1answer
131 views

Update Command Requires a Valid insertCommand when passed DataRow

I am having problem while executing the following code. Using Ngpsql Data Adapter. The function takes the datatable creates and update query Parameter string values are dynamically generated update ...
0
votes
1answer
186 views

Can I define custom type mapping for parameters and fields in PetaPoco?

I'm currently trying to pick a C# ORM to use with my PostgreSQL database, and I'm interested in the micro-ORMs, since they allow me to better utilize the power of Postgres(and since full blown ORMs ...
0
votes
1answer
264 views

Insert DataTable Directly to PostGres Database through ODBC

I have a problem I am an average developer of .net applications as I was working in PHP earlier. I want to insert a populated DataTable directly to Database through ODBC in .net language is C# Can ...
2
votes
2answers
234 views

PostgreSQL: Inserting High Quantity in Multi Tables with Foreign Keys

So, I'm working on a project that involves inserting a huge amount of data over the course of a day into three main tables. The three tables are all linked to each other. Here are the tables: event ...
1
vote
2answers
83 views

NHibernate: Oracle & PostgreSql

I have an application that stores data in database (oracle) I have simple model public class FileTemplate { public string Xml { get; set; } ... } and class map public class FileTemplateMap ...
1
vote
2answers
272 views

Can't immediately receive multiple notifications in Npgsql

Today i wrote the following code that works with PostgreSQL C# library named Npgsql: using System; using System.Collections.Generic; using System.Linq; using System.Text; using ...
2
votes
2answers
1k views

Postgresql - Create Database & Table dynamically

This code is not working. Can anyone direct me where I can find examples of creating a Postgresql database and table on the fly with C#? const string connStr = "Server=localhost;Port=5432; ...
4
votes
1answer
137 views

Linq and Entity Migrations with specific schemas in PostgreSQL

With PostgreSQL I can perform queries against tables in a specific schema, or across multiple schemas at once. I'm wondering how to handle two scenarios: How do you specify either multiple schemas ...
0
votes
1answer
118 views

Reference to lookup table in C# LINQ using PostgreSQL

Good day everyone. I have several tables in PostgreSql. Main table CREATE TABLE main_table ( main_table_id serial NOT NULL, ... some data fields ... table_type integer, <--- ...
4
votes
1answer
104 views

Getting Messages back from postgres

I am initiating a vacuum process in postgres from a C# executable. I want the message to be returned back to my executable, but i I'm not able to get the message back from output window. In short, ...
1
vote
2answers
139 views

Save NpgsqlPoint (Postgresql Point) With Entity Framework

I am trying to save a Point Type into Postgresql I have tried this way. (Db table Model definition) public NpgsqlPoint Position { get; set; } I set the Object with this method posData.Position ...
1
vote
0answers
217 views

Update and delete queries in a transaction [closed]

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
82 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 ...

15 30 50 per page