aspose file tools*
The moose likes JDBC and the fly likes executing a statement !!!!!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "executing a statement !!!!!!!" Watch "executing a statement !!!!!!!" New topic
Author

executing a statement !!!!!!!

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Hi All,

when i try to execute below query in jdbc..i get error that:

java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'emp'.

but it is executing in sqlserver window..
what is the problem..

any one please explain me..how to get the resultset?
--------------------------------------------------------
select emp.employeeid,emp.name,emp.experience,emp.phone,
emp.email,dep.depname dn,emp.fathername,emp.taddr,emp.paddr,
emp.skills,emp.qualification,emp.dob,emp.gender,emp.maritals,emp.dateofjoin
from employeetable emp,departments dep where emp.depid=dep.depid;
-------------------------------------------------------------

thanks & regards,
seetharaman
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Hi All,

i find the error..problem is my code only...i rearrange the code now it is working..

thanks & regards,

seetharaman
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321


i find the error..problem is my code only...i rearrange the code now it is working..


:thumb:


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: executing a statement !!!!!!!