简体   繁体   English

Npgsql.PostgresException 过程未找到异常

[英]Npgsql.PostgresException procedure not found exception

I`ve been trying to make a little winform application with DataGridView element.我一直在尝试使用 DataGridView 元素制作一个小的 winform 应用程序。 Ive been following one guide pretty thoroughly when i encountered a problem.当我遇到问题时,我一直非常彻底地遵循一个指南。

Im trying to insert new row into my db on my local postgre server.我试图在我的本地 postgre 服务器上的数据库中插入新行。 I ve created a procedure我创建了一个程序

CREATE PROCEDURE sp_insertcust(
    aclub_id BIGINT,
    apassport BIGINT,
    aadress TEXT,
    atelephone BIGINT,
    aname TEXT)
    LANGUAGE SQL
AS $$
    INSERT INTO customer (club_id, passport, adress, telephone, name)
    VALUES (aclub_id, apassport, aadress, atelephone, aname)
    RETURNING id $$

but when i`m trying to use it in my c# code like this (ds is DataSet)但是当我试图在我的 c# 代码中使用它时(ds 是 DataSet) 在此处输入图像描述 i get this exception我得到了这个例外

Npgsql.PostgresException: "42883:function sp_insertcust(aclub_id => bigint, apassport => bigint, aadress => text, atelephone => text, aname => text) does not exist"

How do i fix it?我如何解决它?

I`ve been trying to make a little winform application with DataGridView element.我一直在尝试使用 DataGridView 元素制作一个小的 winform 应用程序。 Ive been following one guide pretty thoroughly when i encountered a problem.当我遇到问题时,我一直非常彻底地遵循一个指南。

Im trying to insert new row into my db on my local postgre server.我试图在我的本地 postgre 服务器上的数据库中插入新行。 I ve created a procedure我创建了一个程序

CREATE PROCEDURE sp_insertcust(
    aclub_id BIGINT,
    apassport BIGINT,
    aadress TEXT,
    atelephone BIGINT,
    aname TEXT)
    LANGUAGE SQL
AS $$
    INSERT INTO customer (club_id, passport, adress, telephone, name)
    VALUES (aclub_id, apassport, aadress, atelephone, aname)
    RETURNING id $$

but when i`m trying to use it in my c# code like this (ds is DataSet)但是当我试图在我的 c# 代码中使用它时(ds 是 DataSet) 在此处输入图像描述 i get this exception我得到了这个例外

Npgsql.PostgresException: "42883:function sp_insertcust(aclub_id => bigint, apassport => bigint, aadress => text, atelephone => text, aname => text) does not exist"

How do i fix it?我如何解决它?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 c#中的Postgresql Npgsql.PostgresException - Postgresql Npgsql.PostgresException in c# Npgsql.PostgresException:关系“表名”不存在' - Npgsql.PostgresException: relation "tablename" does not exist' C#与SQLEditor — Npgsql.PostgresException 42703:“用户名”列不存在 - C# vs SQLEditor — Npgsql.PostgresException 42703: column “username” does not exist Npgsql.PostgresException:'55000:在此会话中尚未定义序列“ student_folio_id_seq”的当前时间” - Npgsql.PostgresException: '55000: currval of sequence “student_folio_id_seq” is not yet defined in this session' Npgsql.PostgresException (0x80004005): 42883: 运算符不存在: jsonb #> text - Npgsql.PostgresException (0x80004005): 42883: operator does not exist: jsonb #> text Npgsql.PostgresException:'42P01:关系“表”不存在” - Npgsql.PostgresException: '42P01: relation “table” does not exist' 尝试在 C# Winform 中查询 PostgreSQL 数据库时,ExecuteReader 出现 Npgsql.PostgresException 错误 - Npgsql.PostgresException error on ExecuteReader when attempting to query PostgreSQL database in C# Winform 连接到 Redshift 集群时出错 - Npgsql.PostgresException: 28000: no pg_hba.conf entry for host - Error connecting to Redshift Cluster - Npgsql.PostgresException: 28000: no pg_hba.conf entry for host PostgreSQL:负载测试抛出错误 - Npgsql.PostgresException:“53300:抱歉,已经有太多客户端” - PostgreSQL: Load testing throws error - Npgsql.PostgresException: '53300: sorry, too many clients already' 单声道上的 Npgsql 超时异常 - Npgsql timeout exception on mono
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM