Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   System error 203 The System could not find environment option (http://www.velocityreviews.com/forums/t20438-system-error-203-the-system-could-not-find-environment-option.html)

sfunds sfunds 05-04-2004 05:03 PM

System error 203 The System could not find environment option
 

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 05-05-2004 04:13 AM

Re: System error 203 The System could not find environment option
 
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" <sfunds@yahoo.com> wrote in message
news:O6%23m9mfMEHA.3668@TK2MSFTNGP11.phx.gbl...
>
> 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 05-05-2004 05:38 AM

Re: System error 203 The System could not find environment option
 



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;passwo rd=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 05-05-2004 07:56 AM

Re: System error 203 The System could not find environment option
 
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" <sfunds@yahoo.com> wrote in message
news:%23TInuMmMEHA.3420@TK2MSFTNGP11.phx.gbl...
>
>
>
> 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;passwo rd=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!




Sridhar Raman 05-05-2004 12:12 PM

Re: System error 203 The System could not find environment option
 
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 05-05-2004 01:09 PM

Re: System error 203 The System could not find environment option
 
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" <sfunds@yahoo.com> wrote in message
news:e0tl5opMEHA.624@TK2MSFTNGP11.phx.gbl...
> 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 05-05-2004 02:07 PM

Re: System error 203 The System could not find environment option
 
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 05-06-2004 06:23 AM

Re: System error 203 The System could not find environment option
 
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" <sfunds@yahoo.com> wrote in message
news:OCxqEpqMEHA.2644@TK2MSFTNGP11.phx.gbl...
> 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 05-06-2004 08:05 AM

Re: System error 203 The System could not find environment option
 
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!

CT 05-06-2004 09:46 AM

Re: System error 203 The System could not find environment option
 
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" <sfunds@yahoo.com> wrote in message
news:OYjnYD0MEHA.3348@TK2MSFTNGP09.phx.gbl...
> 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!





All times are GMT. The time now is 12:36 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.