cancel
Showing results for 
Search instead for 
Did you mean: 

Connect to SQL Server (MSSQL) with jdbc 1.0 from WebDynpro

Former Member
0 Kudos

I have installed the Connection for the SQL Server, and now it's easy to use it under WebDynpro.

I write this for thows who didn't know how to create the Connection.

-install MSSQL Server 2000

- Download SQL Server 2000 Driver for JDBC SP 3

http://www.microsoft.com/downloads/details.aspx?FamilyId=07287B11-0502-461A-B138-2AA54BFDC03A&displa...

- open Visual Admin ( C:\usr\sap\J2E\<instance name>\j2ee\admin )

- open Cluster/Server/Services -> JDBX Connector -> Driver

-Click Create new Driver and give it a name e.g. "SQL Server"

- choose the 3 jar Files that you have installed by the SQL Server 2000 Installation ( e.g. C:\Programme\SQLServerDriver\lib)

- the driver is now installed

Creating the Datasource

- Click DataSource

- Click New Datasource

- Fillout this Properties

- DataSource Name : "MyDatasource"

- Add Alias : "MyAlias"

- DriverName : "SQLServer"

- JDBC Version : 1.0

- Driver Class : com.microsoft.jdbc.sqlserver.SQLServerDriver

- Database URL : jdbc:microsoft:sqlserver:// <IPAdresseofServer>:1433

- User : Username for the SQL Database

- Password : Password for the User

- Additional Tab > SQL Engine : Vendor SQL

Now you can use the SQL Database at WebDynpro:

try {

InitialContext iC = new InitialContext();

DataSource dataSource = (DataSource)iC.lookup("jdbc/MyAlias");

java.sql.Connection connection = dataSource.getConnection();

ResultSet resultSet = statement.executeQuery("select * from Names");

}

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member1173626
Participant
0 Kudos

hi patrick,

i just wanted to let you know that thanks to the info you posted in your message, it really helped us out! i read your message more than a year after you posted it, but we could not have succeeded without your info. it was exactly what we needed.

many thx,

mm