Using OWC 2000 Pivot in ASP.NET

D

DLS

I developed an application in ASP.NET(VB) that uses SQL 2000 backend. Because
the clients are using Office 2000 I need to use OWC 2000 pivot table to
connect to the back-end SQL. Does anybody have source code that displays the
pivot table and connects to a SQL backend? I've tried many ways, inlcuding
ADODB. Here is my latest non-functional attempt: (I get the error message "No
such interface supported" on the dsc.connection.open and next line also)

Dim sSQL As String = "SELECT ..."
Private sCN As String =
"provider=sqloledb;server=localhost;uid=User;pwd=*******;database=DATA"
Private ptAnalysis As New OWC.PivotTable
Private sErr As String = ""
Private DSC As msdatasrc.DataSource
Private Income As ADODB.Recordset

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not Me.IsPostBack Then
Try
Dim dsc As New DataSourceControl
Dim Income As New ADODB.Recordset
DSC.ConnectionString = sCN
dsc.UseRemoteProvider = True
dsc.Connection.Open()
dsc.RecordsetDefs.AddNew(sSQL, dsc.Constants.dscCommandText, Income)
dsc.Execute("Income")
ptAnalysis.DataSource = DSC
ptAnalysis.DataMember = "Income"
ptAnalysis.ActiveView.AutoLayout()
ptAnalysis.AutoFit = False
ptAnalysis.height = 420
ptAnalysis.width = 540
Catch ex As Exception
sErr = ex.Message
Finally
dsc.Connection.Close()
End Try
End If
End Sub

Any help will be appreciated.

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top