cancel
Showing results for 
Search instead for 
Did you mean: 

How to we retrieve database content to a cell table?

Former Member
0 Kudos

hi all, i am trying to let user to view the database data from Web dynpro through the use of table view in a web page. Was wondering where do i get start if i am using a MS SQL DB. Any beginner tutorial to guide me to that? thx~

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi...

Open SQL for WD JAVA

http://help.sap.com/saphelp_nw04s/helpdata/en/97/68d64260752a78e10000000a155106/frameset.htm

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/101cbffa-0701-0010-239f-f338d9ab0c71 -->Software

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2351eb90-0201-0010-d297-f4681c2a...

These links may help u..

Regards,

Arun..

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

as mentioned from ur previous entry, u taught me to change to

// Create a URL specifying an ODBC data source name.

String url = "jdbc:odbc:MyAlias";

// Connect to the database at that URL.

Connection connection = DriverManager.getConnection(url);

if i m attaching my MSSQL database to the ODBC instead of JDBC.but when i run my web dynpro project i got an error saying java.sql.SQLException: No suitable driver? do anyone know what is wrong?

Former Member
0 Kudos

Hi

Make sure that your database driver is in the classpath

Regards

Ayyapparaj

Former Member
0 Kudos

sorry i m a real noob. how to check whether our database driver is in the classpath? thx 😃

Former Member
0 Kudos

right click on webdynpro project->properties->Java Build path->Libraries

and check whether the required jar is there.If not select add external jars and go to the corresponding folder and select the jar file.

After doing this go to navigator perspective and add the same jar file to the lib directory

Message was edited by:

Armin Reichert

Former Member
0 Kudos

which jar file shld i add?

Former Member
0 Kudos

hi Ayyapparaj KV,

with regards to the blog link u given me. I am abit confuse with the third part of the picture which is the software for linking the database? cus currently i am using Data Sources (ODBC) to link up my MS SQL DB. so i was wondering is that relevant to Data Sources (ODBC)?

Former Member
0 Kudos

Hi,

in the blog the connection is established using JNDI. This is the best practice when Connection pooling is required.

Change the following line

DataSource ds = (DataSource) ctx.lookup("jdbc/<<DataSourceName>>");

Connection con=ds.getConnection();

To

// Create a URL specifying an ODBC data source name.

String url = "jdbc:odbc:test";

// Connect to the database at that URL.

Connection con = DriverManager.getConnection(url, "user", "pwd");

Regards

Ayyapparaj

Former Member
0 Kudos

Hi,

Refer this Blog /people/anilkumar.vippagunta2/blog/2007/02/20/reading-and-writing-images-from-sqlserver-in-webdynpro

Regards

Ayyapparaj