stanl
03-23-2008, 06:14 AM
I have an issue where updating from Access to SQL Server might involve duplicate rows on a non-primary key field.
Currently This is performed by an ADO While loop which iterates the Access Table by row. I have tried using an ADO Command with [pseudo-code] OpenRowset
SELECT * INTO dbo.SQLTable
FROM OPENDATASOURCE( 'Microsoft.Jet.OLEDB.4.0',
'Data Source = ''C:\Access.mdb'',"SELECT * FROM AccessTable WHERE NOT EXIST ("SELECT * FROM dbo.SQLTable WHERE dbo.SQLTable.Field = AccessTable.Field"))
But nothing happens. I assume there is improper syntax, and if it catches anyones eye, I would appreciate any corrections. Thanks... Stan
Currently This is performed by an ADO While loop which iterates the Access Table by row. I have tried using an ADO Command with [pseudo-code] OpenRowset
SELECT * INTO dbo.SQLTable
FROM OPENDATASOURCE( 'Microsoft.Jet.OLEDB.4.0',
'Data Source = ''C:\Access.mdb'',"SELECT * FROM AccessTable WHERE NOT EXIST ("SELECT * FROM dbo.SQLTable WHERE dbo.SQLTable.Field = AccessTable.Field"))
But nothing happens. I assume there is improper syntax, and if it catches anyones eye, I would appreciate any corrections. Thanks... Stan