cancel
Showing results for 
Search instead for 
Did you mean: 

How do i create a database connection frm my InteractiveForm to MS SQL 2005

Former Member
0 Kudos

I now have an Adobe Interactive Form that i deployed using SAP Netweaver.

The next thing i need to do now is to create a database connection to connect my form to MS SQL 2005 without using SAP Netweaver, is there any way i can do this? Because i need to allow the form to be pre-filled when my form is being Downloaded.

Scenario: When user clicks on a download button on the web, they will download my form, and when they download my form, the form will be pre-filled and the information to be pre-filled depends on the user's login ID.

Is there anyway i can create this database connection?

I will award points as long as the information provided is useful in anyway at all.. 😃

Thanks in Advance..

Accepted Solutions (0)

Answers (1)

Answers (1)

junwu
Active Contributor
0 Kudos

Hi Jing xuan,

it is just pure java programing.

you can create a class with following code.

InitialContext ctx = new InitialContext();

DataSource ds = (DataSource) ctx.lookup("jdbc/ADSTAT_RO");

Connection adstatCon = ds.getConnection();

adstatCon .prepareStatement("YOUR SQL");

after you retrieved the data, you can store them in context which will be bind to your form. so your form will be populated.

Best regards,

John

Former Member
0 Kudos

Im really thankful John for all the help u have provided me 😃

But also, im sorry to say im not that good in all these >_<

Where do i implement this code? in the Implementation? and where do i put these codes into?

How do i create the class etc.

Sorry for all the trouble >_<