I put the DataWindowObject in server side, use SetfullState to set the
client interface.

Using the same function, some times I got the NullReferenceException
exception.
However sometimes it works without any error.

The following is the source sample.
I debugged into the source and the return DataWindowFullState is not null.

dw.SetFullState(...GetFullState(....))



public Sybase.DataWindow.DataWindowFullState GetFullState(string
dataObject,object[] paraValues,string whereCondition,bool isBlankNew)
{

try
{
DataStore Ds=new DataStore();
Ds.LibraryList=.......LibraryList; ///Library path
Ds.DataWindowObject=dataObject;

if(isBlankNew)
{
Ds.InsertRow(0);
}
Sybase.DataWindow.DataWindowFullState dwf=Ds.GetFullState();
Ds.Dispose();
return dwf;
}
catch
{
return null;
}
}



Error Trace:
StackTrace " at DataWindowInterop.Services.LoadDataFromStorage(IntPtr
given_DW, IntPtr FullState)\r\n at
Sybase.DataWindow.DataWindowControl.SetFullState(DataWindowFullState
FullState)


Can anyone tell me the reason?

Thanks.