Skip to Content
author's profile photo Former Member
Former Member

Problem with .Net connector losing connection

I'm writing my first .Net connector project (i.e. please be gentle with me!) - it's an ASP.NET page (using vb.NET) that connects to SAP and checks for failed jobs.

It works fine the first time it runs - calls the Bapi_Xmi_Logon then calls Bapi_Xbp_Job_Select.

I've got a timer set up that calls the subroutine that calls Bapi_Xbp_Job_Select every 30 seconds - but this fails after the first time with "Object reference not set to an instance of an object" - the only way to prevent this seems to be to call the logon routine every time.

Is this how it should work?, or should the logon remain until I explicitly close it?

Any help gratefully received, and sorry if I'm being thick!

Martin Dolphin

Bentley Motors Limited

martin.dolphin@bentley.co.uk

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Apr 01, 2004 at 09:38 AM

    Hi Martin,

    it might be that you use the SAPLoginProvider for Login (in conjunction with Login form). In this case you must not close the connection. The connection is stored in session state and will be automatically closed on session end event.

    If this information doesn't help, you might want to post some code snippets.

    Regards,

    Reiner.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.