on 06-12-2008 10:17 AM
Hi there,
Can someone tell me:
-how to create a datasource for MS SQL server? Do you also have to install a SQL server driver and such?
-how to connect to MS SQL & execute queries from EJB? Are there specific jars or something that have to be added to the EJB?
If possible a step-by-step?
Thanks
Kind regards
Hi Allan,
Try going through my article once:
If I am not wrong, your problem should get solved by this document. Leave that portion of the document where I explain how to create a web service from the EJB.
Bye
Ankur
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ankur,
Coincidentally, I stumbled upon your article this morning.
It was useful as my datasource didn't work before due to one of the following reasons:
-Open SQL: tables have to be rigistered via JDDI before using the db (if you know how, that would be helpful), but apart from that, there was another error:
JDBC driver not supported for MS_SQL_SERVER database.
-Native SQL: didn't work either; same exception.
-Vendor SQL: this works.
Only thing I'm afraid of is that when the DB crashes, you won't have an automatic reconnection via vendor SQL.
Did you take this into account or...? If yes, how?
Thanks a lot!
Hi Allan,
try to fetch data via EJB QL from database in this u can create tables in java dictionay. n entity beans can b used for data store to database. u can access data base via creation of web service for session bean which will contain ur business logic.
Go through this : [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ca4a9c90-0201-0010-c389-8738cd51a88e]
u can test it via making webservice of session bean directly..
or u can use web dynpro interface wid EJB..
Regards,
Khushboo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please go through this blog
/people/anilkumar.vippagunta2/blog/2007/02/20/reading-and-writing-images-from-sqlserver-in-webdynpro
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ayyapparaj,
Thanks a lot! However I have a question.
Isn't it necessary to also make use of a javabeans model?
If you have a document on how you did this, that would be great!
I need to get data from MS SQL via EJB.
That EJB has to be used in webdynpro and somehow the fetched data has to be shown in a table. I know this can be done via context, but isn't there a need for a model based on EJB?
I just don't understand what I can do in EJB (for the model) since I only need to fetch data from SQL and show it on the screen...
Kind regards
Hi,
You have two options to acheive this
1) One is what you have mentioned using Bean model to do this you have to create DTO out of your EJB and use this for model import
2) Create webservice out of your EJB and use adaptive webservice .
https://sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/600cb8d1-a8be-2910-a0b1-f13d32d42690
Regards
Ayyapparaj
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.