Sybase with SSIS

  • Hi !

    I have installed Sybase client on my machine and configured the ODBC Connection and it's working fine but while making the connection to Sybase server i was getting the error message as below . can any one help me in connecting to sybase server.Thanks in advance 🙂

    " TITLE: Connection Manager

    ------------------------------

    Test connection failed because of an error in initializing provider. No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))

    ------------------------------

    BUTTONS:

    OK

    ------------------------------

  • Hi RamSteve,

    I also have to take Sybase data into SSIS - I found I had all sort of issues with it (such as the issue you've mentioned). It took weeks (and me almost giving up with it ) but in the end I used a script task in the data flow to reference the DSN directly - so not setting it up in SSIS

    Here is a code snippet

    Imports System

    Imports System.Data

    Imports System.Math

    Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper

    Imports Microsoft.SqlServer.Dts.Runtime.Wrapper

    <Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute()> _

    <CLSCompliant(False)> _

    Public Class ScriptMain

    Inherits UserComponent

    Dim ODBCConnString As String

    Dim ODBCConn As Odbc.OdbcConnection

    Dim ODBCReader As Odbc.OdbcDataReader

    Public Overrides Sub PreExecute()

    MyBase.PreExecute()

    Dim Cmd As New Odbc.OdbcCommand()

    ODBCConnString = "dsn=my_dsn;uid=user;pwd=password"

    ODBCConn = New Odbc.OdbcConnection(ODBCConnString)

    ODBCConn.Open()

    Cmd.Connection = ODBCConn

    Cmd.CommandText = "{CALL sybase_stored_proc}"

    Cmd.CommandType = CommandType.StoredProcedure

    Cmd.CommandTimeout = 0

    ODBCReader = Cmd.ExecuteReader()

    End Sub

    Public Overrides Sub CreateNewOutputRows()

    Do While ODBCReader.Read

    With Output0Buffer

    .AddRow()

    If ODBCReader.GetValue(0).ToString = String.Empty Then

    .column1_IsNull = True

    Else

    .column1 = ODBCReader.GetValue(0)

    End If

    End With

    Loop

    ODBCReader.Close()

    End Sub

    End Class

    I may be getting ahead of where you are at but I found Sybase & SSIS did not play nicely with one another.

    Mack

  • Hi !

    I am New to SSIS Development can you please provide me the sample code for 2008 version ? as i was getting the error messages related to override with in the methods as per your code ..Thanks in advance

  • Just to add, I had to do it a once off, but had problems with Sybase and SSIS via ODBC, but everything worked out as soon as the Sybase DB was stopped and restarted. Maybe give it a try as well

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply