[英]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.