So on my behind code in C# I have a Select Statement:
Select username from vw_members where username = 'SomeValue'
But that returns this error on my aspx page:column "username" does not exist
If I run that same statement in the pgAdmin SQLEditor it runs no problem
If I run something like this on my behind code:
Select username from tbl_users where username = 'SomeValue'
Runs fine.
The view is a join with the user table and a members table. here is my C# code:
string selectstmt = "Select UserName from vw_members where UserName = 'SomeValue'";
My View in pgAdmin looks like:
SELECT tbl_member.usertype AS "usertype",
tbl_member.userid AS "userid",
tbl_member.createdate AS "createdate",
tbl_member.lastlogindate AS "lastlogindate",
tbl_member.email AS "email",
tbl_users.userid AS "usersid",
tbl_users.username AS "username",
tbl_users.lastactivitydate AS "lastactivitydate"
FROM tbl_users,
tbl_member
WHERE tbl_users.userid = tbl_member.userid;
It was suggested I have a look to see if case sensitive column collation was enabled and turns out it is enabled. From there I made sure all my column names match in the same case, after that everything is working.