Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Michel Levy
  Where is Michel Levy?
 
 France
 Michel Levy
 To: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 Tags
Subject: RE: visual studio 2010 c# tutorials
Thread ID: 365686 Message ID: 365799 # Views: 68 # Ratings: 0
Version: Not Applicable Category: Databases, Tables and SQL Server
Date: Monday, December 31, 2012 2:25:37 PM         
   


> >
> > --
> > Anders,
> >
> > thanks for the links; I didn't understand that you were speaking of the SQL RECEIVE command (I know it and use it in SQL Broker Service very often).
> > I tried last year to write some class in VFP to manage the SQL notifications, but I didn't reach the goal :-( maybe I was too lazzy...
> >
> > In a .net client, it is only a few lines to write, et voila! and with StrataFrame add-on, only 1 line. It is simple in .net because .net client "knows" how to subscribe to the QNS using the connection pool of the SQL Native client, and VFP knows nothing about the connection pool (BTW notice that the connection pool give a great speed advantage to .net in the connect/disconnect/connect process)
> >
> > Michel L
>
> Isn't that what CREATE VIEW ... CONNECTION .. SHARE and DBSETPROP('Connection','ShareConnection', .T.) does?
> SQLIDLEDISCONNECT() lets you auto-reuse connections after disconnect, doesn't it?
>
> -Anders

--
Anders,

SQLIDLEDISCONNECT is usefull for asynchronous process in SQLSETPROP, but QNS (Query Notification Services) acts in a different way.

VFP let us connect, share a connection, disconnect, but it is always VFP who ask for a connection to the server, ok? And once disconnected, the SQL Server has no way to send some info to the VFP client, ok?

At the opposite, a .net client who suscribes to QNS remains connectable by the server itself, even after it is disconnected.
It is disconnected, but the ID of the connection is still identified in the pool of connections. And SQL may connect to it, recovering the internal thread it was, and send to this disconnected client a connection order and the information that the data he subscribed to was modified. With QNS, it is not the client who connect/disconnect, but the server!

And unfortunately, I didn't succeed when trying to write such a class in VFP. Maybe an EventHandler on some ODBC event is possible, but that is far over my knowledge.

Michel L

ENTIRE THREAD

visual studio 2010 c# tutorials Posted by DEREK DODOO @ 12/30/2012 9:45:56 AM
RE: visual studio 2010 c# tutorials Posted by Anders Altberg @ 12/30/2012 4:13:01 PM
RE: visual studio 2010 c# tutorials Posted by DEREK DODOO @ 12/30/2012 4:27:11 PM
RE: visual studio 2010 c# tutorials Posted by Anders Altberg @ 12/30/2012 5:27:04 PM
RE: visual studio 2010 c# tutorials Posted by Michel Levy @ 12/30/2012 6:27:31 PM
RE: visual studio 2010 c# tutorials Posted by Anders Altberg @ 12/30/2012 6:54:55 PM
RE: visual studio 2010 c# tutorials Posted by Michel Levy @ 12/30/2012 7:34:57 PM
RE: visual studio 2010 c# tutorials Posted by Anders Altberg @ 12/31/2012 12:39:29 AM
RE: visual studio 2010 c# tutorials Posted by Michel Levy @ 12/31/2012 10:35:11 AM
RE: visual studio 2010 c# tutorials Posted by Anders Altberg @ 12/31/2012 1:44:15 PM
RE: visual studio 2010 c# tutorials Posted by Michel Levy @ 12/31/2012 2:25:37 PM
RE: visual studio 2010 c# tutorials Posted by Anders Altberg @ 1/1/2013 1:57:14 PM
RE: visual studio 2010 c# tutorials Posted by Michel Levy @ 1/1/2013 2:47:23 PM
RE: visual studio 2010 c# tutorials Posted by Jack Ryan @ 1/25/2013 6:02:41 PM
RE: visual studio 2010 c# tutorials Posted by Michel Levy @ 1/25/2013 7:41:24 PM
RE: visual studio 2010 c# tutorials Posted by Om Rajan @ 12/30/2012 6:10:03 PM
RE: visual studio 2010 c# tutorials Posted by Cetin Basoz @ 12/31/2012 3:45:29 AM
RE: visual studio 2010 c# tutorials Posted by DEREK DODOO @ 1/24/2013 5:44:43 AM
RE: visual studio 2010 c# tutorials Posted by Cetin Basoz @ 1/24/2013 10:01:30 AM