Click here to Skip to main content
13,093,097 members (64,418 online)
Click here to Skip to main content
Add your own
alternative version


19 bookmarked
Posted 22 Jan 2008

MaxDB Connection

, 22 Jan 2008
Rate this:
Please Sign up or sign in to vote.
How to connect ot MaxDB with c#


I have noticed a very small amount of support available for MaxDB. I have had the need to interface a dot net application to MaxDB for for the following reasons:

1. MaxDB is our SAP backend and I can host my database on the SAP server eliminating the need to me to do further maintenace on a new db.

2. Performance of the SAP database server.

3. The database is free :)

Using the code

The code is pritty simple. All the application does is connect ot a MaxDB database.

SQLConnection is obviously out of the question as it only connects to a SQL server, So I have used the next best thing. Odbc connection. The reason for this is I can have my data access seperate from my business logic and as such still you data tables and adapters.

OdbcConnection con = new OdbcConnection("driver=sap db;servernode=" + txtServer.Text + ";serverdb=" + txtDatabase.Text +
                                                    ";uid=" + txtUserName.Text.ToUpper() + ";pwd=" + txtPassword.Text.ToUpper());
                MessageBox.Show("Successfully connected to Database");
            catch (Exception ex)

Hope this helps someone ... basically all it is is a connection string for MaxDB.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author
Architect Unitrade
South Africa South Africa
Born Jarrod Pereira in 1981

Finished School in 1999

Developer ever since Smile | :)

Happy coding.

All things are possible through Christ who strengthens me.

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.170813.1 | Last Updated 22 Jan 2008
Article Copyright 2008 by
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid