Results 1 to 9 of 9

Thread: Sharing variables between Projects ?

  1. #1

    Thread Starter
    Lively Member Atte's Avatar
    Join Date
    Feb 2004
    Posts
    79

    Sharing variables between Projects ?

    I have several Projects in a Solution.
    How can i call a variable from other Project..?
    ..or can i share a variable between two Projects..?

    Many thanks for any help....

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Expose it as a public property and get a reference to it. The bigger question is why?

  3. #3

    Thread Starter
    Lively Member Atte's Avatar
    Join Date
    Feb 2004
    Posts
    79
    Project A is calling Project B and want B to open with dataset automatically filled by certain record (Sql2k)...

    Maybe i have wrong approach when concidering shared variable..?

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    What types of projects are they (exe,dll)?

    A dll would just reference and pass. If you mean exe then you'd need to use remoting, sockets, or write the dataset to xml and pass the file location (or xml string) via the command line param.

  5. #5

    Thread Starter
    Lively Member Atte's Avatar
    Join Date
    Feb 2004
    Posts
    79
    They're exe projects and Windows Application.

    In Project A there is a record ID selected and it should be sent to B to fill a dataset there... What would you recommend..?

    Thks this far....

  6. #6
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Are project A and B assumed to be on the same machine? How often will they communicate? Does the communication need to be two-way?

  7. #7

    Thread Starter
    Lively Member Atte's Avatar
    Join Date
    Feb 2004
    Posts
    79
    A and B exe files are in same folder.
    End user starts the communication i.e. it may happend whenever.
    Communication needs to be one-way only.

  8. #8
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Passing something via the commandline is probably the easiest route.

  9. #9
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    Hi,

    Is the following too cumbersome?

    In project A
    Store the ID in a separate table (which will contain only that information)

    In Project B
    Get that ID from the table.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width