hi AUDI,
> Thanks for your reply but I guess that you misunderstand me because
> your suggestions did not work. and I get the following error
> " Error number is -2147217865 and Error description is Invalid object
> name 'C:\Pathname\datafile.mdb.tablename'.
> Did you notice that I want to insert some records in a table in
> Access data file and the source table in MS SQLServer.
if you like to use a mixed scenario, with JET and SQL Server data source,
you can have a look at a linked server solution with an SQL Server
connections...
you can add a linked server pointing to the Access database like following,
where a pesudo copy of the original JET table is created an populated from
the original data
SET NOCOUNT ON
USE master
GO
-- adding linked server
EXEC sp_addlinkedserver
@server = 'my_JET_db',
@provider = 'Microsoft.Jet.OLEDB.4.0',
@srvproduct = 'OLE DB Provider for Jet',
@datasrc = 'D:\NWIND.MDB' -- point to Nortwind JET database
GO
-- use your database.. here just define a new table in tempdb
USE tempdb
GO
CREATE TABLE dbo.MSDE_customers (
CustomerID VARCHAR(60) PRIMARY KEY ,
CompanyName VARCHAR(60) ,
ContactName VARCHAR(60) ,
ContactTitle VARCHAR(60) ,
Address VARCHAR(60) ,
City VARCHAR(60) ,
Region VARCHAR(60) ,
PostalCode VARCHAR(60) ,
Country VARCHAR(60) ,
Phone VARCHAR(60) ,
Fax VARCHAR(60)
)
GO
PRINT 'SELECT from the linked server Jet database'
SELECT TOP 10 * FROM my_JET_db...Customers
PRINT 'Import rows to the MSDE database via INSERT INTO'
INSERT INTO dbo.MSDE_customers SELECT * FROM my_JET_db...Customers
PRINT ''
PRINT 'SELECT from the MSDE database'
SELECT TOP 10 * FROM dbo.MSDE_customers
GO
-- cleanup
DROP TABLE dbo.MSDE_customers
GO
USE master
go
EXEC sp_dropserver 'my_JET_db', 'droplogins'
further information and relative synopsis about sp_addlinkedserver system
stored procedure can be found at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_a
dda_8gqa.asp

Signature
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtm http://italy.mvps.org
DbaMgr2k ver 0.11.1 - DbaMgr ver 0.57.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
--------- remove DMO to reply
AUDI - 28 Apr 2005 15:23 GMT
Hi Andrea,
I would like to greatly thank you and I tested what you suggested and it
works fine after adding remote login...
But again this is not my case. My case is as : I have a database on
sqlserver on PC1
I want users from other machines to connect and do every thing ( Insert ,
delete , update and so on...) What else I want is to print reports as
backend each user has his GUI interface ( VB Application ) and as I was
used to do the reporting task with access database and Crystal report for
now Ver 7...
So I want the effective way to insert records into the user access file
selected from the Central ( SQL SERVER DATABASE)
I hope I am very clear this time.
Any tips will be highly appreciated
> hi AUDI,
> > Thanks for your reply but I guess that you misunderstand me because
[quoted text clipped - 59 lines]
> further information and relative synopsis about sp_addlinkedserver system
> stored procedure can be found at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_
sp_adda_8gqa.asp
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
[quoted text clipped - 3 lines]
> interface)
> --------- remove DMO to reply