By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,279 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Append specific Data From SQL Server To MS Access Table

P: 30
Hi!
I was wondering if it is possible to get the specific data coming from SQL Server 2000 and append it to my MS Access Table through VB Code????
If it so, please advise me on how i can do this kind of importing Data.

Thank You
Jun 17 '08 #1
Share this Question
Share on Google+
3 Replies


mafaisal
100+
P: 142
Hello

Create 2 Connection 1 for sql And another for Access
Using First connection Select Fields from SqlTable

Then Insert or update int Acces using 2 Connection

Faisal
Jun 17 '08 #2

P: 30
Thank You for the Information. However, I created this code so far but i dont know why isn't working, here's my code:

Dim strSql As String

strSql = "INSERT INTO OpenDataSource('Microsoft.Jet.OLEDB.4.0','Data Source=" & App.Path & "\Extract.MDB;')...[Sam_Timedata] ([EmployeeID],[Pin],[Timedata],[Count],[InOut],[strEmployeeID]) " & _
"SELECT EmployeeID, Pin, Timedata, Count, InOut, strEmployeeID From dbo.Timedata;"
adCon.Execute strSql (FYI: adCon is my SQL Server Connection)

The Error say's "OLE/DB provider returned msg"Microsoft.Jet.OLEDB.4.0','Data Source=" & App.Path & "\Extract.MDB' is not a valid path. Make sure that the path name is spelled correctly and that your are connected to the server on which the files resides."


but actually, when i checked the path it was correct and I dont know what the system means about this,.. Any Advise. thank you.
Jun 18 '08 #3

debasisdas
Expert 5K+
P: 8,127
it seems you lack basic knowledge of connection and SQL.

Please refer to Howtos section of VB in the forum for some related articles.
Jun 18 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.