Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

[ODBC SQL Server Driver][SQL Server]The multi-part identifier "voter.eno" could not be boound  RSS feed

 
raktim banerjee
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Sir!
I am trying to update a table from JSP. The JSP page takes input a value of an attribute from a HTML page and show those records which matches the value. But got error::
I wrote this:



How to overcome he problem? please help me.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A general tip for the future: mixing JDBC code (or any Java code for that matter) and JSP code is not considered good practice. You probably want to move this into some sort of bean.

Another general tip: you appear to be using the JDBC ODBC bridge. You don't need to for SQL Server, and it is a buggy thing, so I wouldn't bother. Life is easier if you use a property type 4 driver.

Your error:

The multi-part identifier "voter.eno" could not be bound.

Sounds like the object you are querying does not exist. If you connect to SQL Server using SQL Server Management Studio as the same user you run your code with, can you run the query?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65830
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your first step is to move all of the Java code out of the JSP into a servlet controller. Even if you succeed in getting this error solved, your page is not thread-safe! If more than one person accesses the page at the same time, they will stomp on each other badly.

It's much easier t write and debug Java code in Java classes. Putting Java code into a JSP is a poor practice that has been discredited for almost 10 years now.

If you are unsure how to structure your web app properly, perhaps this article can help.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!