Hello
I doubt datasocket would have anything to do with this. I noticed in your code that you keep opening and closing the datasocket connections without actually checking to see if the connection was active. Try something like this
if(DS_Open ("dstp:\\\\MSDAQDOTNET\\SampleNum", DSConst_ReadAutoUpdate, NULL,
NULL, &dsReadHandle)<0)
goto there;
//Delay(5);
DS_GetStatus (dsReadHandle, &status);
if(status==DSConst_ConnectionError)
goto there;
while(isit=0)
DS_IsConnected (dsReadHandle, &isit);
Delay(0.5);
DS_DiscardObjHandle (dsReadHandle);
goto here;
there:
And also add some delays before opening the database connection and then closing it.
I hope this helps
Bilal Durrani
NI
Bilal Durrani
NI