Solved

ODBC Connection to non SQL server

Posted on 2013-12-07
6
328 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
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.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

895 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

19 Experts available now in Live!

Get 1:1 Help Now