We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can I use a CalcQuick instance in a Windows Service?

Thread ID:

Created:

Updated:

Platform:

Replies:

61527 May 28,2007 12:40 PM May 29,2007 07:57 PM Windows Forms 2
loading
Tags: Calculate
Jorge
Asked On May 28, 2007 12:40 PM

Hi,

I try this in a test windows service:

Protected Overrides Sub OnStart(ByVal args() As String)

Dim oCalc As New Syncfusion.Calculate.CalcQuick
oCalc("x") = 5
oCalc("y") = 2
oCalc("z") = "=[x] + [y]"
oCalc.SetDirty()
My.Computer.FileSystem.WriteAllText("F:\Escritorio\ServLog.txt", "z es : " & oCalc("z"), True)

End Sub

then, in my text file, I obtain this:

z es : =[x] + [y]

instead of:

z es : 7

But in a console application this same code works fine. Can I use a CalcQuick instance in a Windows Service?

I use Syncfusion Essential Studio 4.2.0.37

Administrator [Syncfusion]
Replied On May 29, 2007 06:02 PM

Just something to try, not sure whether this will affect this problem or not. After the

Dim oCalc As New Syncfusion.Calculate.CalcQuick

try adding:

CalcEngine.FormulaCharacter = '='

In 4.4 and earlier, there is a problem with this shared (static) field being initialized properly in server code. This has been corrected in 5.1.

Jorge
Replied On May 29, 2007 07:57 PM

Hi Clay,

I add the lines of code that you suggested and the service now works.

Thank you very much for your help.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;