Groups | Blog | Home
all groups > sql server new users > december 2004 >

sql server new users : Need to interface MS SQL in C++...


acoquinar
12/7/2004 2:24:16 PM
Greetings !



We need to find if MS SQL has an API for connecting C++ components to it.

We don't know if "extended stored procedure (xp)" is the way to go.



Why do we need that ?



We must implement a synchronization software layer to make sure an ODBMS has
the same values as those contained in an MS SQL RDBMS. Our client
applications must use the data in such a way that doesn't fit with the
relational paradigm... But the data must be stored in relational fashion for
it needs to be easily extracted or used by our customers.



We would like something that follows the "Observer Pattern" to notify an
ODBMS that a table was modified through the standard "Create", "Update" or
"Delete" events. In fact, it would do more than just notifying. It would
actually push the modified values to the ODBMS space to update it.



It would also need to do the opposite. (i.e. Push modified values from the
ODBMS domain to the RDBMS one.)



Thanks for any help !



_________________________

Acoquinar

MGFoster
12/7/2004 10:26:16 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Before worrying about C++ routines I'd use the SQL Server's Linked
Server ability; then apply triggers to the SQL'r tables you want in
"Observer Pattern" that will "push" the data on the ODBMS db.
Conversely, if the ODBMS db has triggers, create them on the tables that
you want to "push" data into the SQL Server db.

See any db design book for more info on Triggers; or, look in SQL
Server's Books on Line (BOL) for info on triggers and Linked Servers.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQbYuFIechKqOuFEgEQK9UACfVEtTsRQuy1fNdoBOnXVR85Z2Kw4AoN8j
s2fiH6EHoE1LqVGrbZZh55lp
=WLkd
-----END PGP SIGNATURE-----


[quoted text, click to view]
CJ Llewellyn
12/7/2004 11:34:03 PM
[quoted text, click to view]

You mean develop your own components for SQL Server?

[quoted text, click to view]

Surprising the technology you want is called Notification Services

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sqlntsv/htm
/nsp_programmingguide_8neb.asp


acoquinar
12/8/2004 2:05:43 PM
Our goal is really just to create a "Replication" mechanism like the one
associated with SQL Server.

The difference is that we don't wish to syncronize between more than one SQL
Server instances...We wish to synchronize between a central MS SQL Server
and remove ODBMS servers.

It implies a intence synchronization for any DML operations (i.e. "Insert",
"Delete" or "Update") that would occur on the SQL Server instance.

Which entry point or API could we use to do that ?

P.S. "Notification Service" doesn't seam to be an API for sending
notifications based of events that occur in the tables. (Correct me if i am
wrong here !)

Thanks !


[quoted text, click to view]

acoquinar
12/8/2004 2:07:03 PM
Our goal is really just to create a "Replication" mechanism like the one
associated with SQL Server.

The difference is that we don't wish to syncronize between more than one SQL
Server instances...We wish to synchronize between a central MS SQL Server
and remove ODBMS servers.

It implies a intence synchronization for any DML operations (i.e. "Insert",
"Delete" or "Update") that would occur on the SQL Server instance.

Which entry point or API could we use to do that ?

P.S. "Notification Service" doesn't seam to be an API for sending
notifications based of events that occur in the tables. (Correct me if i am
wrong here !)

Thanks !
[quoted text, click to view]

acoquinar
12/8/2004 2:11:26 PM
Correction,... (REMOTE instead of remove)

The difference is that we don't wish to syncronize between more than one SQL
Server instances...We wish to synchronize between a central MS SQL Server
and A REMOTE ODBMS servers.


[quoted text, click to view]

CJ Llewellyn
12/8/2004 10:45:38 PM
[quoted text, click to view]

<quote copyright="Microsoft">
A notification can be generated and sent to the user as soon as a triggering
event occurs. Or, a notification can be generated and sent on a
predetermined schedule specified by the user. The user's subscription
specifies when the notification should be generated and sent to the user.
Notifications can be sent to a wide variety of devices. For example, a
notification can be sent to a user's cellular phone, personal digital
assistant (PDA), Microsoft Windows Messenger, or e-mail account. Because
these devices often accompany the user, notifications are ideal for sending
high-priority information.

</quote>

acoquinar
12/9/2004 8:55:31 AM
That is why we say that it's probably not what we're looking for.

We're not looking for a User Oriented feature but an API that allows us to
trigger synchronization routines based on any transactions made in a DB.

We probably something more low-level no ?

[quoted text, click to view]

CJ Llewellyn
12/9/2004 11:04:34 PM
[quoted text, click to view]

No, the notification server is designed to allow messages to be dispatched
to different subscribers in different formats over a wide variety of
protocols.

The main examples given in the book are to human receipients, however the
technology works just as effeciently and effectively for other applications
and systems.

You'll see that the API has support for both subscribing to notifications as
well as being able to send and receive notifications.

AddThis Social Bookmark Button