Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Ok here is the quick version. I have a .MDF file on a remote computer(in the processing plant) this has software on it that is third party custom built and I have no access to the code. It stores its data in a .MDF database file on its local hard Drive. I need a method to copy that data on a daily basis to my sqlserver for the purpose of reporting.

Can somebody point me in the right direction? my google foo is not coming up with the answer today. I do not need somebody to write the code for me, just a pointer down the right path on how to do this.

I'm thinking a stored proc on my sql server that reaches out every day at end of shift and simply copies the days data over? But how can I point to that stinking orphaned .MDF file? full sql is not installed on the remote computer, nor can it be at this point. Yes I do have access to the MDF and can copy it manually and attach to my sql server with no trouble, but I need a way to get the data daily, not manually do this every day.
Thanks in advance for your patience and any help given.
Posted

1 solution

Hi,

you can create simple console application that reads data from the MDF file and insert similar data in your sql database. you need two connection string one to connect with MDF file and another to connect with SQL server.

Now next step is to add this application in Task Scheduler and set the interval for execution as per your need.

i think this is the easiest way to get your work done

best luck
 
Share this answer
 
Comments
gavindon 11-Dec-12 14:22pm    
I think that is the way that I am going to go. Thanks for your response and have a good day.
AmitGajjar 11-Dec-12 23:56pm    
your welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900