System error 203 The System could not find environment option

Discussion in 'ASP .Net' started by sfunds sfunds, May 4, 2004.

  1. I have implemented all the function exposed my the interface.

    However when I start Wealth-lab and when it calls the WLEod Interface

    it gives error

    System error 203
    The System could not find environment option
    that was entered


    How do i ensure the Wealth-lab finds environment option

    or
    what is the procedure for implementing interfaces exposed by other
    application
    Thanks



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    sfunds sfunds, May 4, 2004
    #1
    1. Advertising

  2. sfunds sfunds

    CT Guest

    Is this a .NET related question? If so, you need to show some code, please.

    --
    Carsten Thomsen
    Enterprise Development with VS .NET, UML, and MSF
    http://www.apress.com/book/bookDisplay.html?bID=105
    "sfunds sfunds" <> wrote in message
    news:O6%...
    >
    > I have implemented all the function exposed my the interface.
    >
    > However when I start Wealth-lab and when it calls the WLEod Interface
    >
    > it gives error
    >
    > System error 203
    > The System could not find environment option
    > that was entered
    >
    >
    > How do i ensure the Wealth-lab finds environment option
    >
    > or
    > what is the procedure for implementing interfaces exposed by other
    > application
    > Thanks
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    CT, May 5, 2004
    #2
    1. Advertising

  3. Imports System
    Imports System.Data
    Imports System.Data.SqlClient
    Imports System.ComponentModel
    Imports WealthLab




    Public Class SQLConnector
    Implements WealthLab.IWealthLabEOD3



    Public Function CreateDataSource() As String Implements
    IWealthLabEOD3.CreateDataSource
    CreateDataSource =
    "server=(local);database=ShareMarket;UID=sa;password=sa"
    End Function

    Public Sub FillSymbols(ByVal DSString As String, ByVal Symbols As
    IWealthLabStrings3) Implements IWealthLabEOD3.FillSymbols
    Dim myReader As SqlDataReader
    Dim mySqlConnection As SqlConnection
    Dim mySqlCommand As SqlCommand



    mySqlConnection = New
    SqlConnection("server=(local);database=ShareMarket;UID=sa;password=sa")
    mySqlCommand = New SqlCommand("select CompanyName from
    ScriptDetails", mySqlConnection)

    Try
    mySqlConnection.Open()
    myReader = mySqlCommand.ExecuteReader()




    Do While (myReader.Read())
    Symbols.Add(myReader("nse_symbol").ToString())
    Loop
    Catch e As Exception
    Console.WriteLine(e.ToString())
    Finally
    If Not (myReader Is Nothing) Then
    myReader.Close()
    End If

    If (mySqlConnection.State = ConnectionState.Open) Then
    mySqlConnection.Close()
    End If
    End Try

    End Sub

    Public Sub LoadSymbol(ByVal DSString As String, ByVal Symbol As
    String, ByVal Bars As IWealthLabBars3, ByVal StartDate As Date, ByVal
    EndDate As Date, ByVal MaxBars As Integer) Implements
    IWealthLabEOD3.LoadSymbol
    Dim myReader As SqlDataReader
    Dim mySqlConnection As SqlConnection
    Dim mySqlCommand As SqlCommand
    Dim myDate As Date
    Dim open As Double
    Dim high As Double
    Dim low As Double
    Dim close As Double
    Dim Volume As Integer





    mySqlConnection = New
    SqlConnection("server=(local);database=ShareMarket;UID=sa;password=sa")
    mySqlCommand = New SqlCommand("select
    [timestamp],[open],high,low,[close],tottrdqty from" + Symbol,
    mySqlConnection)

    Try
    mySqlConnection.Open()
    myReader = mySqlCommand.ExecuteReader()
    Do While (myReader.Read())
    myDate = myReader.GetDateTime(0)
    open = myReader.GetDouble(1)
    high = myReader.GetDouble(2)
    low = myReader.GetDouble(3)
    close = myReader.GetDouble(4)
    Volume = myReader.GetInt32(5)
    Bars.Add(myDate, open, high, low, close, Volume)
    Loop
    Catch e As Exception
    Console.WriteLine(e.ToString())
    Finally
    If Not (myReader Is Nothing) Then
    myReader.Close()
    End If

    If (mySqlConnection.State = ConnectionState.Open) Then
    mySqlConnection.Close()
    End If
    End Try
    End Sub

    Public Function GetSecurityName(ByVal Symbol As String) As String
    Implements IWealthLabEOD3.GetSecurityName
    Dim myReader As SqlDataReader
    Dim mySqlConnection As SqlConnection
    Dim mySqlCommand As SqlCommand



    mySqlConnection = New
    SqlConnection("server=(local);database=ShareMarket;UID=sa;password=sa")
    mySqlCommand = New SqlCommand("select nse_symbol from
    ScriptDetails where nse_symbol = " + Symbol, mySqlConnection)

    Try
    mySqlConnection.Open()
    myReader = mySqlCommand.ExecuteReader()
    myReader.Read()
    GetSecurityName = myReader("nse_symbol").ToString()

    Catch e As Exception
    Console.WriteLine(e.ToString())
    Finally
    If Not (myReader Is Nothing) Then
    myReader.Close()
    End If

    If (mySqlConnection.State = ConnectionState.Open) Then
    mySqlConnection.Close()
    End If
    End Try
    Return GetSecurityName
    End Function



    End Class

    The above code works fine with my Test class
    However When i use it in wealth-lab it gives me the above error


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    sfunds sfunds, May 5, 2004
    #3
  4. sfunds sfunds

    CT Guest

    Hmm, from browsing your code I can't see anything wrong. When do you get
    this error, at compile time or run-time? Is it any particular line that
    throws the exception? What is the WealthLab namespace, is it .NET or is it a
    referenced COM component?

    --
    Carsten Thomsen
    Enterprise Development with VS .NET, UML, and MSF
    http://www.apress.com/book/bookDisplay.html?bID=105
    "sfunds sfunds" <> wrote in message
    news:%...
    >
    >
    >
    > Imports System
    > Imports System.Data
    > Imports System.Data.SqlClient
    > Imports System.ComponentModel
    > Imports WealthLab
    >
    >
    >
    >
    > Public Class SQLConnector
    > Implements WealthLab.IWealthLabEOD3
    >
    >
    >
    > Public Function CreateDataSource() As String Implements
    > IWealthLabEOD3.CreateDataSource
    > CreateDataSource =
    > "server=(local);database=ShareMarket;UID=sa;password=sa"
    > End Function
    >
    > Public Sub FillSymbols(ByVal DSString As String, ByVal Symbols As
    > IWealthLabStrings3) Implements IWealthLabEOD3.FillSymbols
    > Dim myReader As SqlDataReader
    > Dim mySqlConnection As SqlConnection
    > Dim mySqlCommand As SqlCommand
    >
    >
    >
    > mySqlConnection = New
    > SqlConnection("server=(local);database=ShareMarket;UID=sa;password=sa")
    > mySqlCommand = New SqlCommand("select CompanyName from
    > ScriptDetails", mySqlConnection)
    >
    > Try
    > mySqlConnection.Open()
    > myReader = mySqlCommand.ExecuteReader()
    >
    >
    >
    >
    > Do While (myReader.Read())
    > Symbols.Add(myReader("nse_symbol").ToString())
    > Loop
    > Catch e As Exception
    > Console.WriteLine(e.ToString())
    > Finally
    > If Not (myReader Is Nothing) Then
    > myReader.Close()
    > End If
    >
    > If (mySqlConnection.State = ConnectionState.Open) Then
    > mySqlConnection.Close()
    > End If
    > End Try
    >
    > End Sub
    >
    > Public Sub LoadSymbol(ByVal DSString As String, ByVal Symbol As
    > String, ByVal Bars As IWealthLabBars3, ByVal StartDate As Date, ByVal
    > EndDate As Date, ByVal MaxBars As Integer) Implements
    > IWealthLabEOD3.LoadSymbol
    > Dim myReader As SqlDataReader
    > Dim mySqlConnection As SqlConnection
    > Dim mySqlCommand As SqlCommand
    > Dim myDate As Date
    > Dim open As Double
    > Dim high As Double
    > Dim low As Double
    > Dim close As Double
    > Dim Volume As Integer
    >
    >
    >
    >
    >
    > mySqlConnection = New
    > SqlConnection("server=(local);database=ShareMarket;UID=sa;password=sa")
    > mySqlCommand = New SqlCommand("select
    > [timestamp],[open],high,low,[close],tottrdqty from" + Symbol,
    > mySqlConnection)
    >
    > Try
    > mySqlConnection.Open()
    > myReader = mySqlCommand.ExecuteReader()
    > Do While (myReader.Read())
    > myDate = myReader.GetDateTime(0)
    > open = myReader.GetDouble(1)
    > high = myReader.GetDouble(2)
    > low = myReader.GetDouble(3)
    > close = myReader.GetDouble(4)
    > Volume = myReader.GetInt32(5)
    > Bars.Add(myDate, open, high, low, close, Volume)
    > Loop
    > Catch e As Exception
    > Console.WriteLine(e.ToString())
    > Finally
    > If Not (myReader Is Nothing) Then
    > myReader.Close()
    > End If
    >
    > If (mySqlConnection.State = ConnectionState.Open) Then
    > mySqlConnection.Close()
    > End If
    > End Try
    > End Sub
    >
    > Public Function GetSecurityName(ByVal Symbol As String) As String
    > Implements IWealthLabEOD3.GetSecurityName
    > Dim myReader As SqlDataReader
    > Dim mySqlConnection As SqlConnection
    > Dim mySqlCommand As SqlCommand
    >
    >
    >
    > mySqlConnection = New
    > SqlConnection("server=(local);database=ShareMarket;UID=sa;password=sa")
    > mySqlCommand = New SqlCommand("select nse_symbol from
    > ScriptDetails where nse_symbol = " + Symbol, mySqlConnection)
    >
    > Try
    > mySqlConnection.Open()
    > myReader = mySqlCommand.ExecuteReader()
    > myReader.Read()
    > GetSecurityName = myReader("nse_symbol").ToString()
    >
    > Catch e As Exception
    > Console.WriteLine(e.ToString())
    > Finally
    > If Not (myReader Is Nothing) Then
    > myReader.Close()
    > End If
    >
    > If (mySqlConnection.State = ConnectionState.Open) Then
    > mySqlConnection.Close()
    > End If
    > End Try
    > Return GetSecurityName
    > End Function
    >
    >
    >
    > End Class
    >
    > The above code works fine with my Test class
    > However When i use it in wealth-lab it gives me the above error
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    CT, May 5, 2004
    #4
  5. It is refrenced Com component


    Sridhar Raman

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Sridhar Raman, May 5, 2004
    #5
  6. sfunds sfunds

    CT Guest

    Is this COM conponent created in VB6 or...? What about the error, does it
    occur at run-time or compile-time and does it happen all the time?

    --
    Carsten Thomsen
    Enterprise Development with VS .NET, UML, and MSF
    http://www.apress.com/book/bookDisplay.html?bID=105
    "Sridhar Raman" <> wrote in message
    news:...
    > It is refrenced Com component
    >
    >
    > Sridhar Raman
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    CT, May 5, 2004
    #6
  7. Hi,
    First of all let me thank you For your help.

    Wealth-lab is share trading application.
    You can write your adapters to get data from different sources.

    The welat-lab(probably a Delphi application)
    exposes WEalthLab class library (Com based)
    In order to wealth-lab read data from my SQL SERVER
    I have to implement the four methods I have written

    I just compiled the above code and what ever dll and files generated in
    bin directory (Interop File) I copied to wealt-lab directory.

    I get the above error

    Thanks

    Sridhar Raman

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Sridhar Raman, May 5, 2004
    #7
  8. sfunds sfunds

    CT Guest

    I don't think this is an error in your code. I bas ethis on the fact that it
    works with a test class, but not when you use it with your wealt-lab
    application. Now, what does the wealt-lab appliation expect, i.e. I assume
    it realies on you providing a COM component, right? If so, have you created
    the wrapper and registered your assembly as a COM component on the system on
    which wealt-lab runs?

    --
    Carsten Thomsen
    Enterprise Development with VS .NET, UML, and MSF
    http://www.apress.com/book/bookDisplay.html?bID=105
    "Sridhar Raman" <> wrote in message
    news:...
    > Hi,
    > First of all let me thank you For your help.
    >
    > Wealth-lab is share trading application.
    > You can write your adapters to get data from different sources.
    >
    > The welat-lab(probably a Delphi application)
    > exposes WEalthLab class library (Com based)
    > In order to wealth-lab read data from my SQL SERVER
    > I have to implement the four methods I have written
    >
    > I just compiled the above code and what ever dll and files generated in
    > bin directory (Interop File) I copied to wealt-lab directory.
    >
    > I get the above error
    >
    > Thanks
    >
    > Sridhar Raman
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    CT, May 6, 2004
    #8
  9. Hi

    Previously I did not do regasm to register the assembly
    I have done that now I dont get system error 203
    Do i need to do anything more to create wrapper and register assembly
    Sorry to bother you again.

    I am posting the code below.
    I get No such interface supported after
    the messagebox(fillsymbol add) and also after load msg box

    It does not come after create data source.
    It fills symbol and the ACC appears in Fill Symbol

    Microsoft support does not say anything abt No such interface supported
    (only for visual interdev it says to reinstall the dll)
    can you figure out what can be the error

    Sridhar Raman

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Sridhar Raman, May 6, 2004
    #9
  10. sfunds sfunds

    CT Guest

    Hi,

    See replies below.

    --
    Carsten Thomsen
    Enterprise Development with VS .NET, UML, and MSF
    http://www.apress.com/book/bookDisplay.html?bID=105
    "Sridhar Raman" <> wrote in message
    news:...
    > Hi
    >
    > Previously I did not do regasm to register the assembly
    > I have done that now I dont get system error 203
    > Do i need to do anything more to create wrapper and register assembly
    > Sorry to bother you again.

    No, that ought to do it.
    >
    > I am posting the code below.
    > I get No such interface supported after
    > the messagebox(fillsymbol add) and also after load msg box

    No code to look at...<g>
    >
    > It does not come after create data source.
    > It fills symbol and the ACC appears in Fill Symbol
    >
    > Microsoft support does not say anything abt No such interface supported
    > (only for visual interdev it says to reinstall the dll)
    > can you figure out what can be the error
    >
    > Sridhar Raman
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    CT, May 6, 2004
    #10
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Adam Knight
    Replies:
    1
    Views:
    1,103
    Ken Cox - Microsoft MVP
    Dec 5, 2005
  2. Chris P.
    Replies:
    4
    Views:
    871
    Martin Bless
    Jan 30, 2005
  3. Gunjan Desai

    Creation of ASPNET user in Active Directory 203

    Gunjan Desai, Mar 29, 2005, in forum: ASP .Net Security
    Replies:
    5
    Views:
    621
    Dominick Baier [DevelopMentor]
    Apr 1, 2005
  4. Rk Ch
    Replies:
    3
    Views:
    94
    Damjan Rems
    Apr 30, 2008
  5. Daniel Moore

    [QUIZ] One Die Game (#203)

    Daniel Moore, May 1, 2009, in forum: Ruby
    Replies:
    3
    Views:
    93
    Daniel Moore
    May 11, 2009
Loading...

Share This Page