Solved

ODBC Connection to non SQL server

Posted on 2013-12-07
6
334 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
ID: 39703052
Are you not able to share the folder on the remote server, and map to it?
0
 

Author Comment

by:pclarke7
ID: 39703131
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
ID: 39704165
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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Author Comment

by:pclarke7
ID: 39704493
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
ID: 39704616
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
ID: 39733530
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

820 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