everhett.raman 0 Newbie Poster

Sure if that helps.

everhett.raman 0 Newbie Poster

It is a order management system with heavy database transactions. The orders have to be in real time. Yet daemons will be feeding real time data into the database as well. I am looking forward to load in-memory database in the services too.
Hense my concern is, could wcf and azure's help me to achieve this by maximizing processing affinity for asynchronous programming (if server farm expands).
Request/response - through tcpBinding (no queues but smart asynchronous request handler implementation).

everhett.raman 0 Newbie Poster

Hi guys, Came across few materials about win azure and wcf services for cloud computing. If anyone working on this platform and technology, can u please share your experience on:
i) Performance (comparison to clustering)
ii) Manageability (deployment)
iii) Scalability (when the server farm expands)
Thank you in advance, would really appreciate any comments pertaining these subjects.

everhett.raman 0 Newbie Poster

1. No all lines are executed. If it does, i would have made my conclusion that execution does not terminate. But surprisingly it does after the last 1 line.
2. This shows, try...catch in MSSQL is not the solution for the @@ERROR problem we faced.

everhett.raman 0 Newbie Poster

Hi guys,
As the pressure for dateline mounted, i had to design a fast solution using the SSBS. There aren't much resources, or otherwise meaningful unless someone understood the SSBS concept. This seems very specialized area of skill-set. I referred to Klaus Aschenbrenner's book for solution implementation.

As solution already designed, this issue of fetching many message (code as below) became an issue.

RECEIVE TOP (10) message_body FROM Target

Could only fetch single message each time. Therefore posted here for some help. At the same time, i revised the SSBS concept again to analyze the problem. As for my findings:
1. Each conversation_handle was different ( because i instantiated different conversation for each message) in my TargetQueue
2. RECEIVE TOP(n) only returns messages belonging to the same conversation_handle only if specified in TOP clause.

Someone please verify this finding to be true, so that it can help me solving my problem and be a help to other as well.

Thank you.

everhett.raman 0 Newbie Poster

Hi,

Looks like there is no help on this issue. Any comment will be appreciated. TQ.

everhett.raman 0 Newbie Poster

Hi,

Try-block is the segment for you code to execute safely. This is in-order to eliminate program crush if exception occurs at runtime. The Catch-block is segment to execute in case exception thrown by the runtime environment.

Every mature code must have a catch segment to trap the unexpected exception thrown. Through this segment, programmer can mitigate the program from crushing and do error-handling to provide reliable solution. Do not forget the finally-segment. This segment is executed on both occasions, on exception and on normal execution. It is good to start practicing this segment.

private static Object DoSomethingFunction()
        {
            // Declare the return object here.
            // But don't intialize it. You may not know
            // what lies in the constructor.
            Object p_result;
            try
            {
                // Perform the intialization here.
                p_result = new Object();

                // On runtime error, exeception will be thrown.
            }
            catch(Exception exp)
            {
                // Set result and other resources to null or
                // error handling state.
                p_result = null;
            }
            finally
            {
                // Do common resource clean-up before 
                // leaving the function. Usually good practice
                // to release resource before exinting.
            }
            return p_result;
        }

It is necessary to start each module with Try-Catch.

everhett.raman 0 Newbie Poster

Hi,

Looks like there is no much help on this topic. Any comments will be appreciated.

everhett.raman 0 Newbie Poster

Hi Zjarek,

Thanks for the info sharing on polyglot. It was really educating.

I think pywriter has posted a very interesting question. For the mentioned scenario, i wonder if inline programming exists in modern languages to solve this puzzle. Or this requires an inter-process communication through pipelining. Or better still, something else.

everhett.raman 0 Newbie Poster

Is it sure, it's not .NET you are talking about? If not so, i am really eager to know too.

everhett.raman 0 Newbie Poster

Yes, many of them said get at least a degree in Computer Science. Try not to confuse yourself with big word ‘IT’. Trust me, it’s a big word. Just like Biology, Physic or something similar.
Survey for a good university and get a basic recognized degree in Computer Science. By this you are just arriving at the station. Computer Science is academic. Try to survey for ‘computer science’ subjects available in the particular university of choice. Do not confuse Software Engineering with Computer Science. Although both are tightly tied, there are still some distinctions.
As you move on, try to narrow your scope according to your interest in the Computer Science field, e.g. Image Processing, Compiler Architecture or etc. Many out there to choose from. Try to really understand these 3 cores in detail if can: Computer Architecture, Computer Mathematics, Compiler Architectures. Mandatory I would say.
Computer science is about concepts and also implementation; therefore do not hesitate to write program at you language of choice. Many to chose from, I would recommend C or C++ to start. Learn a lot of algorithm and data structure pertaining methods to be versatile in programming. Do not tie up to frameworks at first, but to algorithms and coding-fashions.
Oh, yeah let the master explain in detail from here onwards: Very inspiring if you are passionate about the real-deal. http://www.daniweb.com/interviews/interview313564.html

everhett.raman 0 Newbie Poster

Hi,

There are few ways to this. One of it is by sending IntPtr pointing to COntrol's handle. Here is the code.

[Form1]

public partial class Form1 : Form
    {
        private static IntPtr m_oControlHandle;

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            m_oControlHandle = textBox1.Handle;
            Class1 cls = new Class1();
            cls.AccessControl();
        }

        public static IntPtr GetHandle()
        {
            return m_oControlHandle;
        }

    }

[Class1]

class Class1
    {
        public void AccessControl()
        {
            IntPtr p_controlPtr = Form1.GetHandle();

            TextBox txt = (TextBox)Control.FromHandle(p_controlPtr);

            txt.Text = "testing";           
        }
    }

This is a raw solution to give you some ideas. Please remember to clean up the pointer at Form's dispose.

Please vote me & close the thread if this solved your problem.

everhett.raman 0 Newbie Poster

thanks mate great help!

Hi, if i solved your prob. rate me as solving your prob and close the thread. Thank you man.

everhett.raman 0 Newbie Poster

Hi,

The Canon SDK was written in unmanaged code (OS raw environment). .NET uses application domain to somehow partition the threads into groups. This concept can run fine inside .NET framework.

The EDSDK is not in-bound call. Therefore it uses a pointer to hook to the caller. This is cameraPointer you send in to EDSDK. The pointer you send in is more like WinHandler. Therefore secondary thread not in the OS's same address space.

Solution:
1. Keep the EDSDK event-handler in the form's main thread.
2. Create a custom event for EDSDK's eventHandler to fire as soon as message is received.
2. Run a dummy-wait-thread (secondary-thread): delays and wait for event fired, and continue your process.


EDSDK can be tricky.

everhett.raman 0 Newbie Poster

hi,

M'soft sites documented that

RECEIVE TOP (n) FROM Target

should fetch the n number of message from the specified queue. I am having problem with this, and do not know why because not much resource is available pertaining this. Tried finding for an answer on Klaus Aschenbrenner's book, failed.

i) I created the queue in very straight forward script

CREATE QUEUE Target WITH STATUS=ON

.Did i miss any arguements on the queue creation?

ii) Is there any database properties i need to check?

Thank you guys, I still new to Service Broker, any help will be appreciated.

everhett.raman 0 Newbie Poster

Hi,

I tried appending semicolon to every lines, but it still executes the next line. Btw, is semicolon 'the' mandatory end-of-statement in Ms-SQL? Just wondering...

everhett.raman 0 Newbie Poster

Sori, declare public in the global instead of in the function. e.g.

class ReadGradesIn
{
    public int numberOfA;
everhett.raman 0 Newbie Poster

Hi just add public keyword at the variable declaration (e.g. public int numberOfA;..etc). This will solve your prob.

everhett.raman 0 Newbie Poster

Hi,

Yes, this seems more like a web project. If you choose java, you can use JSP(Presentation), Beans (Middle-tier), any database at your preference. Try to read more on 3-tier application architecture. It will be more like a web inventory system.

Any attempt you make, try to envision for future system expansion - use OOP.

.NET is not bad platform for this though, complete package to start with is VS2010.

everhett.raman 0 Newbie Poster

Hi,

I had some sort of questions like that too when i was at your station. The bad news was, those lecturers who suppose to guide me at that time, was lacking of this knowledge. So what they did was 'reading introduction from some books' and teaching it by 'term' and 'abstractions'.

Listen, computer science is about concepts + implementations. Concepts sets the direction, implementation proofs it. (Students who don't want to dirty your hands in programming, better don't sweat it in this areana!!! Studies in Business IT may help you)

The business is driving software engineers to focus more on frameworks (.NET, JDK etc) and to solve problems faster. They are merely using APIs and SDKs (software libraries) to solve the problem. But no one talks about Computer Architectures, Discrete Maths or even Compiler Architecture. You should get some traditional books on these two subjects and dig in deeper if you are interested. Try using C/C++ and a little knowledge in assembly will help you to understand that this is Computer Science were are talking about here.

everhett.raman 0 Newbie Poster

Hi,

As i was experimenting stored procedure's TRY-CATCH with RAISERROR, came across this issue. Would like some opinion on this.

Microsoft sites documented as follows:
SQL Error 0 - 10: caught in the TRY-Block, i.e. will not reach CATCH-block.
SQL Error 11 - 19: caught in CATCH-Block
SQL Error 20 - 25: fatal

This means when error 0 to 10 raised in TRY-block, it will return the error to caller and exit. Try this simple code below.

CREATE PROCEDURE sp_PrimeTestStub
AS 
BEGIN
	DECLARE @CodeBlockName NVARCHAR(20);
	
	SET @CodeBlockName = 'TRY : '
	
	BEGIN TRY
		-- Error raised from body
		RAISERROR ('Error raised in body.' -- Message text.
			  ,9 -- Severity.
			  ,1 -- State.
			  )
		PRINT @CodeBlockName + 'BLOCK'	
		PRINT @CodeBlockName + CAST(ERROR_NUMBER() AS NVARCHAR(9))
		PRINT @CodeBlockName + ERROR_MESSAGE();
		PRINT @CodeBlockName + CAST(ERROR_SEVERITY()AS NVARCHAR(9))	
		PRINT @CodeBlockName + CAST(ERROR_STATE()AS NVARCHAR(9))
		PRINT @CodeBlockName + ERROR_PROCEDURE();
		PRINT @CodeBlockName + CAST(ERROR_LINE()AS NVARCHAR(9))			  			  			  
	END TRY
	BEGIN CATCH
	
	END CATCH
END

Undesirable Output upon sp call:
Error raised in body.
Msg 50000, Level 9, State 1
TRY : BLOCK

Question:
1. Why the next one line is allowed to be executed upon error-raise? Shouldn't it return to caller and exit?
2. Error 21, still executed in CATCH if raised in TRY. Is this how it should handle the fatal error?
3. The TRY..CATCH seems mediocre method to trap and report error. Saying this because, if error raised with 0-10 in TRY-block (unexpected, an execution …

everhett.raman 0 Newbie Poster

sorry correction [at point 3]
3. On Form2_FormClosing call the static property for m_bReturnTripIsSelected and set it true (if round trip failed).

everhett.raman 0 Newbie Poster

Hi,

1. Declare a static variable bool m_bReturnTripIsSelected in the first form.
2. Declare the

private void Form1_Activated(object sender, System.EventArgs e) 
{
if(m_bReturnTripSelected)
{
returnTripRbutton.Enabled = true;
}
}

- this will fire once the form is focused - [http://msdn.microsoft.com/en-us/library/system.windows.forms.form.activate(VS.71).aspx]
3. On Form2_FormClosing call the static property for m_bReturnTripIsActive and set it true (if round trip failed).


Hope this helps.