Skip to Content
Former Member
Oct 23, 2007 at 07:12 AM

Problem in connecting sql server database*urgent*


Good afternoon,

I need to do an application that allow user to search for his employees ID and when the server found his employees ID , it will show NAME and his particular from the SQL database at the adobe interactive form.

I recently found this thread regarding how to connect Connect to sql server database from webdynpro with jdbc 2.0 driver ()Connect to sql server database from webdynpro with jdbc 2.0 driver

I tired and these is what i put in VA:

In the screen that appears, under the “main” tab:

1) DataSource Name =MyDataSource

2) Add Alias = MyAlias.

3) Driver Name=SQL Server

4) JDBC Version= select “2.0 (with XA support)”

5) Object Factor = “”.

Please omit the quotes.

6) DataSource Type =“ConnectionPoolDataSource”

7) CPDS classname = “”.

Under Additional tab. Under the additional properties section, type in:

1) Key: serverName, Value: Localhost

2) Key: databaseName, Value: “CSIT”

3) Key: portNumber, value: “ 1433”

4) Key: user, value: admin

5) Key: password, value: ********

6) For SQL Engine, Select Vendor SQL

As for back code at web dynpro (implementation part)

<u><b>I insert these code at my onActionSearch buttom</b></u>

public void onActionSearch( wdEvent )
    //@@begin onActionSearch(ServerEvent)
    IPrivateInvoiceSummary.IInvoiceDetailElement element =wdContext.createInvoiceDetailElement();
			   Context ctx = new InitialContext();
			   DataSource ds = (DataSource)ctx.lookup("jdbc/MyAlias");	
			   Connection con=ds.getConnection();
			   Statement  st=con.createStatement();
			   ResultSet rs = st.executeQuery("SELECT * FROM InvoiceDetailForm WHERE PVNo= '"+wdContext.currentContextElement().getSearchNo()+"';");
			} catch (Exception e)

I tired to deploy and run the application, it show everything (My textfield, search button and adobe form).

When i key in employees ID and click search , it prom me that the IE has encountered a problem and needs to close.

May i know the reason behind it?