• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ms sql server could not be bound error

 
Anne Crace
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting the following error in MS SQLServer 2005:'' The multi-part identifier "myJavaVariable" could not be bound.'
Here's the code:
fileName is a String and I have tried using an alias and it still blows up. I am using Tomcat 6 and sqljdbc4.jar for the driver.
It works in the query pane when run like this
Help!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are no quotes round your variable, hence you are not comparing a field with a value you are comparing a field with another (non-existant) database object.
 
Anne Crace
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Paul. I changed the query to this: and set the variable like this It isn't pulling back the right number but it is compiling, so I think I can figure it out from here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic