I
Ian Allchin
If anyone out there has been successful in connecting to Sybase ASE 12
from Visual Studio .NET 2003 either in a Windows Forms or Reporting
Services project, can you please help me.
.....
In summary, I wish to:
(a) create a Windows Forms application using VB.NET (Visual Studio
..NET 2003 and .NET Framework 1.1) that will connect to Sybase ASE 12.0
to execute stored procedures.
(b) create a SQL Server Reporting Services report using Visual Studio
..NET 2003, .NET Framework 1.1 and SQL Server Reporting Services that
will connect to Sybase ASE 12.0 also via stored procedures.
I have Sybase 12 Client installed on my development machine and am
able to connect to a test server from this machine using SQL
Advantage.
My code for (a) is:
Dim sybaseconn As System.Data.OleDb.OleDbConnection
Dim sybaseconnstring As String =
"Provider=Sybase.ASEOLEDBProvider;Server Name=XXXXXX;Initial
Catalog=YYYYYY;User ID=UUUUUU;Password=PPPPPP;"
Try
sybaseconn = New System.Data.OleDb.OleDbConnection(sybaseconnstring)
sybaseconn.Open()
Catch ex As Exception
MsgBox(ex.Message)
Finally
Select Case sybaseconn.State
Case ConnectionState.Broken, ConnectionState.Closed
Case Else
sybaseconn.Close()
sybaseconn.Dispose()
End Select
sybaseconn = Nothing
End Try
When I run this, I receive the following message on the Open() line:
"The 'Sybase.ASEOLEDBProvider' provider is not registered on the local
machine."
and this is the exception:
?ex
{System.InvalidOperationException}
[System.InvalidOperationException]:
{System.InvalidOperationException}
HelpLink: Nothing
InnerException: {System.Data.OleDb.OleDbException}
Message: "The 'Sybase.ASEOLEDBProvider' provider is not registered
on the local machine."
Source: "System.Data"
StackTrace: " at
System.Data.OleDb.OleDbConnection.CreateProviderError(Int32 hr)
at System.Data.OleDb.OleDbConnection.CreateProvider(OleDbConnectionString
constr)
at System.Data.OleDb.OleDbConnection.Open()
at Sybase_Stuff.Form1.Button1_Click(Object sender, EventArgs e) in
C:\Documents and Settings\allchini\My Documents\Visual Studio
Projects\Sybase Stuff\Form1.vb:line 98"
TargetSite: {System.Reflection.RuntimeMethodInfo}
My problem with (b) is as follows:
In my Reporting Services project in Visual Studio .NET 2003 I attempt
to set up a shared data source by selecting Add New Datasource. This
displays the Data Link Properties dialog. On the Provider tab, I
select "Sybase ASE OLE DB Provider". When I press Next or OK, I
receive the following message:
Microsoft Data Link Error
Provider is no longer available. Ensure that the provider is
installed properly.
Can you tell me how to achieve (a) and/ or (b)?
Thanks
Ian Allchin
from Visual Studio .NET 2003 either in a Windows Forms or Reporting
Services project, can you please help me.
.....
In summary, I wish to:
(a) create a Windows Forms application using VB.NET (Visual Studio
..NET 2003 and .NET Framework 1.1) that will connect to Sybase ASE 12.0
to execute stored procedures.
(b) create a SQL Server Reporting Services report using Visual Studio
..NET 2003, .NET Framework 1.1 and SQL Server Reporting Services that
will connect to Sybase ASE 12.0 also via stored procedures.
I have Sybase 12 Client installed on my development machine and am
able to connect to a test server from this machine using SQL
Advantage.
My code for (a) is:
Dim sybaseconn As System.Data.OleDb.OleDbConnection
Dim sybaseconnstring As String =
"Provider=Sybase.ASEOLEDBProvider;Server Name=XXXXXX;Initial
Catalog=YYYYYY;User ID=UUUUUU;Password=PPPPPP;"
Try
sybaseconn = New System.Data.OleDb.OleDbConnection(sybaseconnstring)
sybaseconn.Open()
Catch ex As Exception
MsgBox(ex.Message)
Finally
Select Case sybaseconn.State
Case ConnectionState.Broken, ConnectionState.Closed
Case Else
sybaseconn.Close()
sybaseconn.Dispose()
End Select
sybaseconn = Nothing
End Try
When I run this, I receive the following message on the Open() line:
"The 'Sybase.ASEOLEDBProvider' provider is not registered on the local
machine."
and this is the exception:
?ex
{System.InvalidOperationException}
[System.InvalidOperationException]:
{System.InvalidOperationException}
HelpLink: Nothing
InnerException: {System.Data.OleDb.OleDbException}
Message: "The 'Sybase.ASEOLEDBProvider' provider is not registered
on the local machine."
Source: "System.Data"
StackTrace: " at
System.Data.OleDb.OleDbConnection.CreateProviderError(Int32 hr)
at System.Data.OleDb.OleDbConnection.CreateProvider(OleDbConnectionString
constr)
at System.Data.OleDb.OleDbConnection.Open()
at Sybase_Stuff.Form1.Button1_Click(Object sender, EventArgs e) in
C:\Documents and Settings\allchini\My Documents\Visual Studio
Projects\Sybase Stuff\Form1.vb:line 98"
TargetSite: {System.Reflection.RuntimeMethodInfo}
My problem with (b) is as follows:
In my Reporting Services project in Visual Studio .NET 2003 I attempt
to set up a shared data source by selecting Add New Datasource. This
displays the Data Link Properties dialog. On the Provider tab, I
select "Sybase ASE OLE DB Provider". When I press Next or OK, I
receive the following message:
Microsoft Data Link Error
Provider is no longer available. Ensure that the provider is
installed properly.
Can you tell me how to achieve (a) and/ or (b)?
Thanks
Ian Allchin