0

Here is the query I want to run:

SELECT COUNT(*) FROM Users WHERE name = @name AND pwd = @pwd;

My Connection String:

Provider=OraOLEDB.Oracle;User Id = HR; Password = hr;

Specifications:

  • C# WinForms
  • Oracle 11
  • OleDBCommand as command
  • Using Oracle XE

Steps I've tried:

  • Script runs in sqldeveloper on the live server
  • Connection opens
  • Listener is up and running
  • Parameters 'name' and 'pwd' got through and are sent

Error I'm getting:

ORA-00936: missing expression

1 Answer 1

1

In Oracle, parameters are prefixed with : instead of @. Use that instead:

SELECT COUNT(*) FROM Users WHERE name = :name AND pwd = :pwd;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.