If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Connecting to SAP from aspx web page

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-01-12, 07:28
plsh plsh is offline
Registered User
 
Join Date: Nov 2004
Posts: 253
Connecting to SAP from aspx web page

Good day,

I have some code which works perfectly well in a macro of a spreadsheet but now need to put it into a aspx page. Unfortunately it is failing right at the very beginning. My code portion is as follows:

PUBLIC Sub SAP
Dim LogonControl
Dim funcControl
Dim TableFactoryCtrl
Try
LogonControl = Server.CreateObject("SAP.LogonControl.1")
funcControl = Server.CreateObject("SAP.Functions")
TableFactoryCtrl = Server.CreateObject("SAP.TableFactory.1")
Catch ex As Exception
lbInformation.Text = Err.Description
End Try
End SUb

It is failing on the line LogonControl = Server.CreateObject("SAP.LogonControl.1") with the following error:
Retrieving the COM class factory for component with CLSID {B24944D6-1501-11CF-8981-0000E8A49FA0} failed due to the following error: 80040154

SAP is installed on the Server from where the page is running and the macro in the spreadsheet when run on the server where the page is been run from works fine. I just can't understand why this is not working.

The page is a VB asp dot net page.

Please help.
Reply With Quote
  #2 (permalink)  
Old 02-01-12, 10:33
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,075
What does that error number mean?
__________________
oh yeah... documentation... I have heard of that.

*** What Do You Want In The MS Access Forum? ***
Reply With Quote
  #3 (permalink)  
Old 02-02-12, 02:11
plsh plsh is offline
Registered User
 
Join Date: Nov 2004
Posts: 253
From what I can make out it appears to have to do with Class not registered. But I don't understand how that can be when it works perfectly in my VB Script in Excel just not in my aspx web page.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On