How to connect BDC with Sybase Database

Using BDC Editor Tool we can generate metadata xml file for connecting BDC with Sybase database. For this we can either use ODBC or OLEDB connection type. To use ODBC we need to first create DSN. The DSN name along with login credentials needs to be used in the connection string. Once this is done the connection gets established with Sybase database and the tables get populated and subsequently create an instance out of it. But, when we try to execute any of the method instances it doesn't work. It fails saying "The LobSystemInstance Property 'AuthenticationMode' has a value that requires 'Trusted_Connection' in the connection string". The same error is shown even if we add Trusted_Connection in the connection string. The same application definition file when used in SharePoint also doesn't work.

 The issue is because of the XML file that is generated through the editor tool. As we are using ODBC connection, we need to manually make few changes in the XML file in order to make it work.

- First to connect BDC with Sybase Database using BDC editor tool, we need to use ODBC / OLEDB as connection type.

- The connection string should essentially look like this - Dsn=dsnname;uid=username;pwd=password;Trusted_Connection=yes;integrated security=true

- Create an instance of it and then export the file and save it locally as a XML file.

The following changes has to be done manually in the Application Definition file

1. As ODBC is used, do not put quotation marks on the SQL query. The quotation marks are generated by BDC Editor and we need to remove them.

For e.g.: Instead of Select "ProductId", "ProductName" from Products - use Select ProductId, ProductName from Products.

2. Do not put parameters like @pk. This is not accepted by ODBC Driver. It only accepts parameter using ?

For e.g.: Instead of Select "ProductName" from Products where ProductId=@pk use Select ProductName from Products where ProductId=?

3. Trusted connection should be in title case. It should be Trusted_Connection and not trusted_connection.

For e.g.: Instead of <Property Name="rdbconnection trusted_connection" Type="System.String">yes</Property> use

<Property Name="rdbconnection Trusted_Connection" Type="System.String">yes</Property>

4. If the Application definition file is to be used in BDC Data List web part then make sure that there is at least one method instance of type "Finder". By default, BDC editor tool doesn't generate method instance of finder. It generates method instance of type "IdEnumerator". So, change "IdEnumerator" to "Finder".

5. Possibilities are there when we map the Application definition file with BDC web part, it might throw an error saying "unable to connect to abc_instance". In this case change User DSN to System DSN as System DSN is globally available to all users.


Comments (6)
  1. says:


    I am facing with the following problem:

    I am able to connect to Sybase with the Business Data Catalog Definition Editor,

    OLEDB connectivity.

    Provider=ASEOLEDB.1;Data Source=servername:portname;User ID=username;Initial Catalog=DBname

    And I am able to see the Database tables in the design surface. But as soon as I clik ok. The program quits:

    Application Definition Designer has encountered a problem and needs to close.  We are sorry for the inconvenience.

    And in the event log the following error message:

    Event Type: Error

    Event Source: .NET Runtime 2.0 Error Reporting

    Event Category: None

    Event ID: 5000

    Date: 1/16/2009

    Time: 2:11:31 PM

    User: N/A

    Computer: *********


    EventType clr20r3, P1 applicationdefinitioneditor.exe, P2, P3 46b12097, P4 mscorlib, P5, P6 471ebc5b, P7 dc, P8 5, P9 a4dh5wwiwww1yjtmp0c0kv4zwcalu4in, P10 NIL.

    Can anyone help me here?

  2. JainRaj says:

    Data Source=servername:portname;User ID=username;Initial Catalog=DBname;password=

    it will work

  3. chester says:

    I used the string as Jainraj suggests but it does not work. I am connecting to a SQL database and get the exact same errors as Gabor.

    Please help anyone.

  4. Hi Chester,

    If you tried connecting to SQL-server database instance then this will be helpful.


    Please let me know the AuthenticationMode which you have passed while connecting to the database.

  5. chester says:

    Thanks for your prompt response. I am using SQL server authentication. I do not have an instance at all. COuld that be a problem

  6. I suspect the problem will be in passing the credentails. => Create .udl file from the machine and test if you are able to connect to the server.

    => If the apppool identity have the access to your Dabase server, please use RevertToSelf

    => If the Logged Client have the access, please use Passthrough Authentication mode

    =>and then test with BDC definition Editor tool, it comes with MOSS 2007 sdk and check you are able to connect to the server and get the tables list.

    =>You can also use Rdbcredential but you need to configure SSO to pass the credentails to the SQL-Server.

    I hope these steps will assist you to troubleshoot the issue.

Comments are closed.

Skip to main content