• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 564
  • Last Modified:

C# Calling a module from a referenced application

Hi,

I have an application that is being used to call a function from another application, (which I have referenced as a dll).  I can use the functions from the classes in the application, but there is a function that references a module that I cannot retrieve the value from.  Any idea on how to access that module?
0
Jasmin01
Asked:
Jasmin01
  • 4
  • 3
1 Solution
 
sameer_goyalCommented:
Hi Jasmin01,

Are you getting an error/exception when yo try to reference the module or you are not getting the result as expected?
0
 
Jasmin01Author Commented:
I am getting an error on this line:

sSql = "Exec " & sProcName & " " & "'" & SchedID

The SchedID comes from the module, and as a result, the error is : "Object reference not set to an instance of object."
0
 
sameer_goyalCommented:
can you post the line of code where you are calling the module to get SchedID?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Jasmin01Author Commented:
I haven't done that.  Dont know how.  The only thing I have done is added a "using Application1" on my main class, and called the class using
  Info testInfo = new Info();

What do I need to do to call my module Mod1?
0
 
sameer_goyalCommented:
If this module that you are refrring to is a function or method inside Info class, then simply

infoTest.Mod1();

However, it seems you are mixing C# and VB.NET here

what language was used to develop the Application1? I am somehow sure that your current application is C#
0
 
Jasmin01Author Commented:
Application 1 is written in VB.net and I am using C# to do my current application.
0
 
sameer_goyalCommented:
ok

So you should be able to do this

assuming that the Mod1() method returns a string

string SchedID = testInfo.Mod1(pass the required parameters);

and you should be able to use SchedID whereever you want.

The only thing to check is, if Mod1() is defined as Public in Application1
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now