C# where clause and postgres

Fouad Allali 1 Reputation point
2021-01-20T07:33:16.433+00:00

Hi team
I have issue wiht where clause in C# with postgres and access database.

In postgres the query is :

When i declare harn = "azx" it works fine

But when i keep it variable in method not works. Exemple method :

Internal int getvalue(string harn, con)

(Select Id from table1 where column2 = @val , con)
Cmd. Parameters. AddWithValue("val", harn)

Developer technologies | C#
{count} votes

1 answer

Sort by: Most helpful
  1. Fouad Allali 1 Reputation point
    2021-01-20T18:18:54.21+00:00

    thanks the problem solved.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.