posted 1 year ago
I've used JDBC to connect to postgresql and created table user on DB. I am using below code to fetch data from user table.
I have two columns i.e. userName and password. I've tried text, character, character varying datatypes but getting error "The column name userName was not found in this ResultSet.
". Please help.
Here's the code snoppet:
I have two columns i.e. userName and password. I've tried text, character, character varying datatypes but getting error "The column name userName was not found in this ResultSet.
". Please help.
Here's the code snoppet:
posted 1 year ago
Those are good questions, Dana.
I'm going to suggest that Shubhendu could look at the getMetaData() method of ResultSet, which returns an object which can tell you what the names of the ResultSet's columns are, among many other things. That might lead to a better understanding of what's going on.
I'm going to suggest that Shubhendu could look at the getMetaData() method of ResultSet, which returns an object which can tell you what the names of the ResultSet's columns are, among many other things. That might lead to a better understanding of what's going on.
Shubhendu Pramanik
Greenhorn
Posts: 4
posted 1 year ago
Dana Ucaed wrote:Are you sure that the column username is String?
Yes Dana. For password field also I am getting the same error.
My concern is what is the String equivalent datatype of String (userName and password) on PostgreSQL. I've tried below datatypes for userName as well as password resp and getting same error:
text, character, character varying.
Shubhendu Pramanik
Greenhorn
Posts: 4

please buy my thing and then I'll have more money:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
|