Solved

ODBC Connection to non SQL server

Posted on 2013-12-07
6
326 Views
Last Modified: 2013-12-21
Hello,
I have an application which uses ODBC connections to various databases successfully (eg. DB2 database on iseries) I now need to access a .CSV file on a remote printer server which, is not a SQL server, but I am having problems finding a driver for this. I am able to successfully remote to this server using "Remote Desktop Connection" however I need to be able to do this programmatically and retrieve and update details on a CSV file called "Users&Printers". I looked at "Microsoft Text Driver (*.txt, *.csv) " - however this does not seem to have any remote server connection options available.  I need to be able to connect to the server and access the file which is in a folder (C:\Documents and Settings\All Users\Application Data\Optio\OECI\7.7\samples\Users&Printers). Appreciate any suggestions.

regards
Pat
0
Comment
Question by:pclarke7
  • 3
  • 3
6 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
Comment Utility
Are you not able to share the folder on the remote server, and map to it?
0
 

Author Comment

by:pclarke7
Comment Utility
Hi Carl,
no the users will not have mapped drives. I have had a comment elsewhere about using WebClient to access/update the file. Are you familiar with WebClient ?

regards
Pat
0
 
LVL 52

Expert Comment

by:Carl Tawn
Comment Utility
WebClient won't really help in your case, because it requires a Http listener to connect to. Which mean you would have to run IIS on your server, with a virtual directory pointing to the location of the CSV file.

But even that would only provide read access directly. To modify the file you would need to pull it to the client, modify it, and then push it back to the server again.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:pclarke7
Comment Utility
Thanks Carl,
any suggestions about the best method of reading & Updating a file on a remote server without mapping a drive ?

regards
Pat
0
 
LVL 52

Expert Comment

by:Carl Tawn
Comment Utility
Do you have a login that can connect to directly to the remote folder. i.e. Can you connect to \\your-server\c$\Documents and Settings\All Users\Application Data\Optio\OECI\7.7\samples\Users&Printers, rr can you create a domain account that you can use to connect?

If you can't then you are going to need an intermediate service to provide access to the file - which could be an HTTP or FTP server. But anything other than direct access will require a download/modify/upload process.
0
 

Author Closing Comment

by:pclarke7
Comment Utility
Hi Carl,
I have gone with your suggestion - thanks. Just 1 point. I could have multiple users using the application and they could have mapped different drives to the Server. Is there any easy way in c# for the application to look at their mapped drives and automatically select the correct one via the description ?

regards
Pat
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Suggested Solutions

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now