troubleshooting Question

cannot the column data from database

Avatar of zolf
zolfFlag for United Arab Emirates asked on
Java
6 Comments2 Solutions262 ViewsLast Modified:

hello there,

i have this query,but when i run the application i get an error saying : The column name TPORT_NO is not valid.
but i have this column in the table

String stateQuery  = "SELECT MIN(TPORT_NO) FROM dbo.Bookht_Terminal_Ports WHERE (PORTAL_STATE_ID = '1') AND (TERMINAL_ID =" +terminalID+")";
                        System.out.println(stateQuery);                      
                        
                        rsBooks_Rec1 = st.executeQuery(stateQuery);
                        while(rsBooks_Rec1.next())
                        {
                              portNo = rsBooks_Rec1.getInt("TPORT_NO");
                        }
ASKER CERTIFIED SOLUTION
Mick Barry
Java Developer
Join our community to see this answer!
Unlock 2 Answers and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros