Tagged Questions
0
votes
0answers
37 views
How to call an existing stored procedure from Entity Framework
I am writing an app using .net Web Api, Entity Framework and PostgreSql and I am having trouble calling a stored procedure. I've tried to go off of this question: using stored procedure in entity ...
0
votes
1answer
20 views
OverflowException with dotConnection PostgreSQL
I've create model from databse using dotConnect for PostgreSQL, proffesional edition. Everything works fine exception one of the entity. Some of properties were generated as decimal. Sample property ...
-1
votes
1answer
23 views
Workstationid property in PostgreSQL?
Here I need to get a string that identifies the database client using PostgreSQL with C#. Here is the following example.
Example:
private static void OpenNpgsqlConnection(string connectionString)
{
...
0
votes
0answers
10 views
Error: “No row with the given identifier exists[ITELnetERP.Model.Continent#AF ]” in C# with Castle
I am starting a new project using C# + Castle ActiveRecord with PostgreSQL. I have this two classes:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ...
0
votes
1answer
14 views
Strange behavior creating a new Database with Npgsql and Entity Framework
I'm trying to create a new database with npgsql and EF 6. This is my code:
using System.Data.Common;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.Migrations;
using ...
0
votes
1answer
26 views
SQL using postgresql and C3
I have a question regarding multiple tables in postgresql and using sql statements in C#. I have two tables
CREATE TABLE "Board"
(
board_id bigserial NOT NULL,
board_serial_number integer NOT ...
-1
votes
1answer
23 views
PostgreSQL database interaction in C# [closed]
I'm working on a project in which I have a PostgreSQL database containing various tables and what not. I have a c# application that needs to be able to enter new data/change existing data/ or retrieve ...
0
votes
0answers
25 views
Geometry type in NHibernate with Postgresql
I am trying to setup NHibernate with Postgresql type Geometry that contains Point(x,y). This of course is automatically converted into a hex when entered into the database so the data looks like
...
-2
votes
0answers
29 views
Concatenate string with integer in PostgreSQL
as I can fix this query so that you can run the sript
SELECT REPLACE(STR(ISNULL(MAX(usuarioid) + 1, 1), 6), ' ', '0') FROM usuarios
In postgresql concatenation is as follows
SELECT ...
-2
votes
0answers
29 views
C# Project using MySQL - pros and cons? [duplicate]
I want to start a project. To be more specific, I want to develop an ERP using C# language.
I am now, trying to select with DBMS to use. Since I am more familiarized with MySQL, I am thinking to use ...
0
votes
1answer
31 views
Error : Parameter name not found, in Postgresql
I am working in Asp.net with postgresql with devart dotconnect connection driver.
When i am executing a parmeterized query it is showing error,
Parameter name not found
My code is below
...
0
votes
1answer
20 views
take the data from the first match of date and last match of date to calculate a single day data
When I am using code written below it is taking last reading of the date in from_date and last reading of the date in to_date.
So if I want reading of a single day also ,I have to put two different ...
-1
votes
0answers
14 views
How connect C# to Postgresql in host j.layershift.co.uk
I have installed postgresql database in http://postgres-project-1241043.j.layershift.co.uk/ host.
I want to connect to the database using C#. I use Npgsql with following connection string.
...
0
votes
1answer
22 views
Call Web Service(asmx) from PostgreSql function every X hours
I have got a function in PostgreSql:
do $$
declare
arow record;
foo varchar(50);
begin
for arow in
select name from person s(a)
loop
foo := arow.name;
RAISE ...
0
votes
0answers
14 views
postgresql inet type in ActiveRecord C#
I have a postgresql table column "Ip" with the data type inet. C # project I'm trying to retrieve data from this column.
[ActiveRecord("terminal_state")]
public class TerminalState
{
...
0
votes
0answers
24 views
postgresql inet type in C#
I have a postgresql table column "Ip" with the data type inet.
C # project I'm trying to retrieve data from this column.
[ActiveRecord("terminal_state")]
public class TerminalState
{
...
0
votes
2answers
28 views
Read rows in from database and assign the rows values to a string variable in Postgresql and C#
I have a table in my database consisting of one column which is NewLanguage(varchar).I insert new languages to the table and i want to select the rows of the table and assign them to a string variable ...
0
votes
0answers
22 views
Make a relation between two tables in PostgreSql in MVVM
I have a database having two colums one columns for holding intern informations which is Intern.Second is to save programminglanguages added to a stringlist.Intern has a variable which is ...
-1
votes
0answers
13 views
Connect postgresql to c# application [duplicate]
Hello I am very new to postgresql. I was wondering if there is a way to connect postgresql to Microsoft visual studio 2013 and use the info to show in a reportcontrol.
0
votes
0answers
29 views
C# programming to update data in database(pg admin) from a text file daily at some particular timing?
I have around 15 different text files which contain some data. The data in these files get updated each day with few new rows in the same files.
I need to read data from these files n update this ...
0
votes
1answer
23 views
Insert dataset to a table PostgreSQL
I am converting a WCF service with a SQL Server backend to PostgreSQL. I am using Npgsql but it does not have a bulk copy option. test is the dataset here.
This is my sql code,
DataSet ds = ...
0
votes
0answers
14 views
Windows Database service that uses interface for multiple database types
I am new to window services. I have one that does certain things to either a postgresql or a Sql compact database. Each one is extremely similar(because its a service it has OnStart() and OnStop()...) ...
0
votes
1answer
62 views
npgsql 2.1.3 and EF 6: Could not determine storage version; a valid storage connection or a version hint is required
I'm adding the support to EF 6 to my sql generator for PostgreSQL: PostgreSQL Migration Generator
I have created a test project to try it but when I create a new connection return new ...
0
votes
2answers
61 views
PostgreSQL “Column ”foo“ does not exist”
I'm trying to make a search method for my program. In search page, there are 8 variables a user can search in. For example, If user types only into "Name:" this method will Select according to the ...
1
vote
0answers
87 views
Encoding accented characters with C#
Whene i try to display a message text from an postgresql Exception, the accented characters don't display correctly.
With this code :
catch (Exception e)
{
MessageBox.Show("Incorrect user name / ...
1
vote
0answers
50 views
Do not make integer id column serial?
Schema export automatically generates a serial column.
I tried everything:
mapping.Id(x => x.Id)
.CustomType<int>()
.CustomSqlType("integer")
...
0
votes
1answer
36 views
How to check if dotConnect for postgreSQL database connection is right
I've got a excel plugin connected to a PostgreSQL database server and all works well. There is a user interface to switch databases, but when somebody accidentally mistypes the database there are a ...
0
votes
1answer
25 views
data extraction from .rpt file to copy in database in PostgreSQL 9.0
I have a report file(.rpt) having text as shown below and this .rpt file get updated every day.
...
0
votes
0answers
37 views
Rejecting Insert rows with Entity Framework and PostgreSQL
I use PostgreSQL and EF6 in some project.
I want to reject silently some rows I insert who have duplicated data. The table is very simple, looking like :
CREATE TABLE data
(
table_id PRIMARY KEY
...
0
votes
0answers
30 views
statement for npgsql using parameter
I pass the parameters in the sql query using the driver npgsql:
SqlCommand = new NpgsqlCommand();
....
SqlCommand.CommandText = "SELECT id,name FROM table1 WHERE field1=:param2 ORDER BY name;";
...
0
votes
1answer
60 views
Filtering Invalid Byte Sequences for UTF8 Encoding in C# for a PostgreSQL Database
I have been searching and attempting a lot of different solutions to this problem, but have not found an answer yet. Basically, I am inserting data from an ODBC connection into a PostgreSql database ...
1
vote
0answers
54 views
Trying to using EF 6 with PostgreSQL - Failed to find or load the registered .Net Framework Data Provider
I am trying to use EF 6 Code First with Npgsql provider. When I try to run Add-Migration command in package manager I have the following exception: Failed to find or load the registered .Net Framework ...
0
votes
1answer
40 views
Make a new table in DB to extract data from an already existing large table
I am working on a database which has around 2 year data and has around 10 crore rows and 30 columns with values of every 10 seconds of different parameters. I want to create a new table which will ...
2
votes
1answer
187 views
PostgreSQL error: query string argument of EXECUTE is null
I have a table called evidence with a trigger which calls a stored procedure which basically does table partitioning by month. However I get an obscure error when I start inserting lots of rows under ...
0
votes
1answer
27 views
Update command using Npgsql postgres and C#
I have created a search form to locate a record based on a search value called license ID. I am able to pull the all the fields for that value. My question is I am trying to update any field for that ...
0
votes
1answer
31 views
PostgreSQL C++ Api getting error LNK1107: invalid or corrupt file: cannot read at 0x2E8
I try libpqxx and pg_bulkload for C++ data bulk loader from my Simple C# App.
Because this two libs on my PC not finally supported.
I now , new create simple DLL project,with native PostgreSQL libpq ...
0
votes
1answer
55 views
Drop Postgresql database
I am trying to drop a database from aspnet(c#). But It is giving me an error: There are some connections.
If I delete all the connections:
SELECT pg_terminate_backend (pg_stat_activity.pid) FROM ...
0
votes
1answer
48 views
How to get the value of selected row from PostgreSQL in C#?
I am using PostgreSQL database with C# and the Npgsql library.
Right now I can select the last row in my table, but I can not figure out how to assign a C# variable to it. I know that my selection ...
0
votes
1answer
43 views
The underlying provider failed on ConnectionString PostgreSql EF6
My web.config:
<system.data>
<DbProviderFactories>
<remove invariant="Devart.Data.PostgreSql" />
<add name="Npgsql Data Provider" ...
3
votes
1answer
175 views
System.Data.Common.DbCommand: Parameterized Query as Procedure Parameter?
I have procedure in PostgreSQL defined as:
CREATE OR REPLACE FUNCTION CreateCursorC(text, text)
RETURNS text
LANGUAGE c
AS '$libdir/mylibs', $function$createcursorc$function$
Execute example:
...
2
votes
1answer
74 views
Remove all special characters from string
For example tableA contains two columns called prodid and product. productcolumn consists of more than 100 rows the rows may contain product names with some special characters like * , ' [ ( ] ) # ...
0
votes
1answer
54 views
Linq and Lambda Expressions with postgreSQL database
Is it possible to use Lambda Expressions to query a PostgreSQL database in C#?
I've tried with ODBC and with Npgsql, but haven't found a way to do so yet.
What I would like to do is something ...
0
votes
0answers
31 views
Npgsql first connection takes a long time
I am using PostgreSQL 9.3 and npgsql 2.1.3 on Windows with .NET 4.0. I installed PostgreSQL with default settings and running as a service. I use Npgsql in a WPF project in order to test Binding the ...
0
votes
1answer
57 views
Connecting to POSTGRES database using DataSet for Simple Report in C#
I'm using Simple Reports in Visual Studio 2012, c# language, and when I try to connect my data from database using DataSet, I cannot find my postgres database (w/c is 64bit, version 9.3) in creating ...
0
votes
0answers
64 views
Entity Query in Query, is it possible
I'm not really sure how to ask this question. I need to create an object, I believe it is called a projection, that has the result of one query, plus from that need to query another table and get ...
0
votes
1answer
12 views
Adding Controller in Web.Config for MVC4 error
My project is a Web project for MVC4 and I am trying to add a controller after adding a connection string to the web.config folder, but every time i try to add it, i get the following message:
...
0
votes
0answers
33 views
Error when trying to lookup database
I have a button that has code attached to it:
DataTable pieteikumu_tabula = new DataTable();
NpgsqlDataAdapter adapter = new NpgsqlDataAdapter();
adapter.SelectCommand = new ...
0
votes
2answers
52 views
Using ON UPDATE CASCADE when update causes duplicate values
In PostgreSQL, I have one master table, ICD9, that is intended to hold unique combinations of cicd9 and cdesc with the constraint of:
CONSTRAINT constraint_cdesc UNIQUE (cicd9, cdesc)
I have ...
0
votes
0answers
69 views
WinForm PostgreSQL Notification Messaging
I built a simple C#/.Net console application a while ago that alerts me to when a table is updated in PostgreSQL. The following code is that working version. I get the messages without issue and ...
0
votes
3answers
109 views
Ugly time format in GridView ASP.NET C#
In my ASP.NET project I have a GridView to display times (among other things). I'm using Visual Studio 2012 and PostgreSQL and pgAdmin.
In the database times are stored in tbl_tid as:
This is also ...