Error 'Parameter $1 Missing' when I try to create a stored procedure using a pgsqlcommand object

Error 'Parameter $1 Missing' when I try to create a stored procedure using a pgsqlcommand object

Postby kcrenshaw » Wed 22 Mar 2006 23:55

I get the error "Parameter $1 missing' when I try to create a stored procedure using the following code:

cmdStr = New StringBuilder
cmdStr.Append("CREATE OR REPLACE FUNCTION SP_DEL_TASK(TEXT) RETURNS INTEGER AS $$ ")
cmdStr.Append("DECLARE ")
cmdStr.Append("tid ALIAS FOR $1; ")
cmdStr.Append("BEGIN ")
cmdStr.Append("DELETE FROM tasks WHERE tasks.taskid = tid; ")
cmdStr.Append("RETURN 0; ")
cmdStr.Append("END; ")
cmdStr.Append("$$ LANGUAGE 'plpgsql'; ")
Dim str As String = cmdStr.ToString
cmd = New PgSqlCommand(cmdStr.ToString, conn)
cmd.ExecuteNonQuery()

I am using PostgreSQLDirect .NET Data Provider 2.20.

Thanks for your help,

Kevin
kcrenshaw
 
Posts: 7
Joined: Wed 22 Mar 2006 23:47

Postby SecureGen » Thu 23 Mar 2006 09:17

We have fixed the problem. The fix will be available in the next build of PostgreSQLDirect .NET. Watch for announcements in the forum. Thank you for the information.
SecureGen
Devart Team
 
Posts: 133
Joined: Thu 08 Sep 2005 06:27


Return to dotConnect for PostgreSQL