Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

pulling data from local DBs into network DB

Posted on 2013-05-28
21
Medium Priority
?
254 Views
Last Modified: 2013-08-08
hey guys, i'm just curious. i know that from a local machine with access to a network i can load data from the local database to the network database by setting the connection.

can i, from the network DB pull the data from the local machines? inversion of control so to speak
0
Comment
Question by:developingprogrammer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 6
  • 3
  • +1
21 Comments
 
LVL 75
ID: 39203638
I'm sure you can if ... the Network can 'see' the local machine.
0
 

Author Comment

by:developingprogrammer
ID: 39261308
ok, thanks databaseMX, could you share with me the VBA code i can write so that when i run this code from the database on the network it will go into all the different local machines and pull the data? thanks!! = ))
0
 
LVL 58

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 1200 total points
ID: 39281634
<<ok, thanks databaseMX, could you share with me the VBA code i can write so that when i run this code from the database on the network it will go into all the different local machines and pull the data? thanks!! = )) >>

 It's no different then your local DB to a "network" DB; it's just a matter of a path.

 You network DB is reached either with a mapped drive or UNC (\\server\path) convertions.

 You can either:

a. create a linked table definition using that

b. use the OpenDatabase() method in DAO.

 I would probably go for b simply because it's easir to work with multiple table (and assuming your going to do this all in code).

Jim.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 40

Assisted Solution

by:Vadim Rapp
Vadim Rapp earned 400 total points
ID: 39281939
Yes, you can. The whole difference is that when you upload the data from local db on machine A to network db on machine B, you use something like this:

open connection to B
insert into B.database.table(columns) select columns from database.table

On the remote it would be like this:

open connection to A
insert into database.table(columns) select columns from A.database.table
0
 
LVL 75
ID: 39282084
Sorry .... guess I completely missed the initial response.

"could you share with me the VBA code"
Sorry, I don't have such code per se.

mx
0
 

Author Comment

by:developingprogrammer
ID: 39283709
i see thanks guys!! and no probs MX, you've helped me heaps and heaps of times already haha = ))

hrmm, how do i get the path of the local machine? i'm sorry i know it's a very noob networking question but i'm a noob!! = P
0
 
LVL 58

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 1200 total points
ID: 39284745
<<rmm, how do i get the path of the local machine?>>

 Well that as they say is the $100 question.

 You could:

1. Keep the paths in a table.
2. Always have the DB in a specific location on the client.
3. Scan the clients HD for the file.
4. Have something on the client that points to where the file was installed, which you then read (registry entry, file out on disk, etc).

Jim.
0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 400 total points
ID: 39285125
" i know it's a very noob networking question"
Not really ...
0
 

Author Comment

by:developingprogrammer
ID: 39305513
thanks guys!!

so let's say i install the application on the desktop on every computer, could you give me the sample code for
1) how would i pull the path name cause it would be "username/desktop" where the username keeps changing right?
2) so i store the value from solution 1) in a table. what code do i use then to pull the data from the local apps into the network app?

if yall could give me some sample code to work with for 1) and 2) that would be great!! thanks guys!! = ))
0
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 1200 total points
ID: 39307536
<<so let's say i install the application on the desktop on every computer, could you give me the sample code for>>

There's no real "code" to speak of.

At it's simplest, I would install the app in the same location, say C:\myApp\myApp.MDB on every client.   That way, you always know where it is.

As for the reference, you need the machine name and depending on your security, might use the hidden admin share. So in your code, you create a table link with:

 \\<machine name>\C$\myApp\myApp.MDB

The other way to do it would be to create a share on the client PC to point to the DB when you install it.  Say it was called 'myAppShareName'

Then in your app, you simply do:

  \\<machine name>\myAppShareName\myApp.MDB

Beyond that, things get really complex if on the fly, you want to determine the users special folders through windows (say they installed it on their desktop) and you can run into a bunch of security issues.

  One thing is that their special folders (like the desktop, MyDocuments, etc) may not even be on their machine as the domain may be redirecting home folders and/or using romaning profiles.  That's why I'd stay away from doing that.

 Personally, I'd use one of the two methods above and probably the second to avoid the use of the admin share, which requires admin priv's on for the client station.

 With the other approach, you can control the share permissions and set it up for "everyone".

Jim.
0
 

Author Comment

by:developingprogrammer
ID: 39343720
great! thanks Jim! i need a bit more time to implement everything else in my project and then implement this. let me get to that stage and revert back to yall. thanks!!
0
 

Author Comment

by:developingprogrammer
ID: 39343751
sorry guys, need a bit more time! = )
0
 

Author Comment

by:developingprogrammer
ID: 39388083
guy need more time as still not at the finishing stages of the project yet sorry!
0
 
LVL 75
ID: 39388090
np. thx for update.
0
 

Author Closing Comment

by:developingprogrammer
ID: 39394039
hey guys, i'm sorry but i don't have the bandwidth to implement this now. however i've saved this under my personal knowledge and will be revisiting this to implement it once my project is finished.

i'm so so sorry for the delayed response and hope yall will still continue helping me! = )
0
 
LVL 75
ID: 39394063
no problem ...
Thanks for using Experts Exchange .


mx
0
 

Author Comment

by:developingprogrammer
ID: 39394099
Thank YOU for help me so much all along DatabaseMX! = )
0
 
LVL 75
ID: 39394112
You are certainly welcome ...
Clearly it has been a team effort, including yourself and other EE experts :-)
0
 

Author Comment

by:developingprogrammer
ID: 39394128
= )) I wanna help out too when I get better!! After reading the whole of leban's site, allenbrowne's site, databasedecelopment.co.uk's site and then perhaps the book on SQL that Christian recommended me previously = ) and I want to be super good in objective C too so I can help out there too!! Thanks DatabaseMX!! = ))
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
New style of hardware planning for Microsoft Exchange server.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question