Click here to Skip to main content
15,891,951 members
Home / Discussions / Database
   

Database

 
GeneralRe: sql server connection problem Pin
Rupesh Kumar Swami1-May-07 5:01
Rupesh Kumar Swami1-May-07 5:01 
GeneralRe: sql server connection problem Pin
kubben1-May-07 5:03
kubben1-May-07 5:03 
GeneralRe: sql server connection problem Pin
Rupesh Kumar Swami1-May-07 5:18
Rupesh Kumar Swami1-May-07 5:18 
GeneralRe: sql server connection problem Pin
kubben1-May-07 5:42
kubben1-May-07 5:42 
GeneralSecurity Information Pin
Brady Kelly27-Apr-07 23:36
Brady Kelly27-Apr-07 23:36 
GeneralRe: Security Information Pin
Lojne28-Apr-07 10:32
Lojne28-Apr-07 10:32 
AnswerRe: Security Information Pin
Jerry Hammond28-Apr-07 10:40
Jerry Hammond28-Apr-07 10:40 
QuestionOLE DB Notification Pin
x_yan_y27-Apr-07 22:16
x_yan_y27-Apr-07 22:16 
Hello everyone:
i write a win32 c++ program,then i add ATL OLE DB consumer in my project.now i need the function that when the SQL database's data change,my main program's window can refresh view.so i refer to msnd:
==========================================================================
Visual C++
Receiving Notifications

OLE DB provides interfaces for receiving notifications when events occur. These are described in OLE DB Object Notifications in the OLE DB Programmer's Reference. Setup of these events uses the standard COM connection-point mechanism. For example, an ATL object that wants to retrieve events through IRowsetNotify implements the IRowsetNotify interface by adding IRowsetNotify to the class-derived list and exposing it through a COM_INTERFACE_ENTRY macro.

IRowsetNotify has three methods, which can be called at various times. If you want to respond to only one of these methods, you can use the IRowsetNotifyImpl class, which returns E_NOTIMPL for the methods you are not interested in.

When you create the rowset, you must tell the provider that you want the returned rowset object to support IConnectionPointContainer, which is needed to set up the notification.

The following code shows how to open the rowset from an ATL object and use the AtlAdvise function to set up the notification sink. AtlAdvise returns a cookie that is used when you call AtlUnadvise.
---------------------------------------------------
CDBPropSet propset(DBPROPSET_ROWSET);
propset.AddProperty(DBPROP_IConnectionPointContainer, true);

product.Open(session, _T("Products"), &propset);

AtlAdvise(product.m_spRowset, GetUnknown(), IID_IRowsetNotify, &m_dwCookie);
============================================================================
the code is so little that i don't know how to implement in my code,did anyone can help me?
thanks a lot!


QuestionSecurity in Sql Server2000 Pin
.NET- India 27-Apr-07 19:27
.NET- India 27-Apr-07 19:27 
AnswerRe: Security in Sql Server2000 Pin
Christian Graus27-Apr-07 20:15
protectorChristian Graus27-Apr-07 20:15 
AnswerRe: Security in Sql Server2000 Pin
Colin Angus Mackay27-Apr-07 22:55
Colin Angus Mackay27-Apr-07 22:55 
GeneralRe: Security in Sql Server2000 Pin
Christian Graus27-Apr-07 23:52
protectorChristian Graus27-Apr-07 23:52 
QuestionCannot find the certificate Pin
reykentj27-Apr-07 12:37
reykentj27-Apr-07 12:37 
QuestionUsing SQL Server logins to login from an Application Pin
Rocky#27-Apr-07 10:45
Rocky#27-Apr-07 10:45 
AnswerRe: Using SQL Server logins to login from an Application Pin
kubben27-Apr-07 11:48
kubben27-Apr-07 11:48 
GeneralRe: Using SQL Server logins to login from an Application Pin
Rocky#28-Apr-07 0:55
Rocky#28-Apr-07 0:55 
Questionrestricting direct access to tables from Enterprise Manager Pin
Rocky#27-Apr-07 10:38
Rocky#27-Apr-07 10:38 
AnswerRe: restricting direct access to tables from Enterprise Manager Pin
Colin Angus Mackay27-Apr-07 22:56
Colin Angus Mackay27-Apr-07 22:56 
Questionhow to pass similarity and look up field values as varibles on Fuzzy lookup Pin
JaneQuestion27-Apr-07 9:05
JaneQuestion27-Apr-07 9:05 
QuestionWhere can I find ADO.NET class library maps? Pin
Slow Learner27-Apr-07 7:47
Slow Learner27-Apr-07 7:47 
Questionsecurity in MSSQL2005 Pin
xx5827-Apr-07 4:23
xx5827-Apr-07 4:23 
AnswerRe: security in MSSQL2005 Pin
kubben27-Apr-07 11:51
kubben27-Apr-07 11:51 
GeneralRe: security in MSSQL2005 Pin
xx5828-Apr-07 0:15
xx5828-Apr-07 0:15 
GeneralRe: security in MSSQL2005 Pin
kubben28-Apr-07 1:13
kubben28-Apr-07 1:13 
GeneralRe: security in MSSQL2005 Pin
xx5828-Apr-07 4:11
xx5828-Apr-07 4:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.