PC Review


Reply
Thread Tools Rate Thread

Data Sync in .NET for SQL Server and Sybase

 
 
James Bolles
Guest
Posts: n/a
 
      31st Jul 2003
I have a situation where I want to move data into a
source database and then replicate that information into
two target databases that are legacy systems. I was
considering using COM+ and ADO .NET but the sybase
database is on UNIX . Anyone ever try to do
heterogenous data replication in .NET/Sql Server?

Thanks,
James
 
Reply With Quote
 
 
 
 
Scot Rose [MSFT]
Guest
Posts: n/a
 
      31st Jul 2003
Unfortunately there is nothing simple in .net to do this, The best thing I have ever found for something like this is the lowly Jet Provider of all things... Take a look at the following
code (Would need to be modified a bit to work in .Net as this is VB6 code, but the idea is in the SQL Statement_ It opens a connection to an empty MDB file and then uses the
provider to do a dandy insert from one SQL Server to another (Using ODBC) You could substitute most any ODBC Complient database into this and make it work...

Dim cn As ADODB.Connection
Dim strSQL As String
Set cn = New ADODB.Connection
cn.CursorLocation = adUseClient
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\AnEmpty.mdb"

strSQL = "Insert INTO [ODBC;Driver={SQL Server};Database=Northwind;" _
& "Server=Server1;uid=sa;pwd=Password1;].[products](ProductName,SupplierID," _
& "CategoryID,QuantityPerUnit,UnitPrice,UnitsInStock,UnitsOnOrder,ReorderLevel," _
& "Discontinued) select ProductName,SupplierID" _
& ",CategoryID,QuantityPerUnit,UnitPrice,UnitsInStock,UnitsOnOrder" _
& ",ReorderLevel,Discontinued FROM [ODBC;Driver={SQL Server};Database=Northwind;" _
& "Server=Server2;uid=sa;pwd=Password;].[products]"

cn.Execute strSQL

Want to know more? Check out the MSDN Library at http://msdn.microsoft.com or the Microsoft Knowledge Base at http://support.microsoft.com

Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email : (E-Mail Removed) <Remove word online. from address>

This posting is provided “AS IS”, with no warranties, and confers no rights.




--------------------
>Content-Class: urn:content-classes:message
>From: "James Bolles" <(E-Mail Removed)>
>Sender: "James Bolles" <(E-Mail Removed)>
>Subject: Data Sync in .NET for SQL Server and Sybase
>Date: Wed, 30 Jul 2003 18:48:29 -0700
>Lines: 9
>Message-ID: <051f01c35705$d7253a20$(E-Mail Removed)>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcNXBdclIhaCdn4QS6qDTwgBcOiRfg==
>Newsgroups: microsoft.public.dotnet.framework.adonet
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.adonet:57098
>NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
>X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
>
>I have a situation where I want to move data into a
>source database and then replicate that information into
>two target databases that are legacy systems. I was
>considering using COM+ and ADO .NET but the sybase
>database is on UNIX . Anyone ever try to do
>heterogenous data replication in .NET/Sql Server?
>
>Thanks,
>James
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use ADO.NET to keep data between client and server in sync Anthony Malt Microsoft ADO .NET 3 3rd Jan 2006 11:02 AM
Sybase Server Installation in Windows 2003 server =?Utf-8?B?U2h5YW0=?= Microsoft Windows 2000 0 10th Oct 2005 09:57 AM
Link via ODBC to Sybase ASE 12 without installing sybase drivers? =?Utf-8?B?QW5keQ==?= Microsoft Access External Data 0 28th Sep 2005 06:02 AM
adaptive server anywhere (Sybase) M D Microsoft C# .NET 3 1st Mar 2005 12:51 PM
Remote Data Sync: Access and SQL Server usign ASP.NET vengala s reddy Microsoft ASP .NET 0 19th Mar 2004 02:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:26 AM.