Solved

When creating a C# console application using VS2005, do I need to have an ODBC DSN set up on the server or can I create the database connection in the program?

Posted on 2013-01-08
1
450 Views
Last Modified: 2013-01-11
I developed a C# Console application using VS2005. In the application I call a Sybase stored procedure.

I also created a System DSN in Windows XP via Administrative Tools and Data Sources(ODBC).

The application works fine on my local machine.

I created a custom setup program to have the application with all its files installed on a server in path D:\SetupENA.

The files included D:\SetupENA are made up of the ENA.exe file along with dll files and a config file.

When the application is executed on the server, it generates the following error:

D:\SetupENA>ENA
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
error messageERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Processing done. Press enter to exit ...

Do I need to install the application on the server or do I just have to place the .exe
file on the server

Do I need to have an ODBC DSN set up on the server or can I create the database connection in the program?
0
Comment
Question by:zimmer9
1 Comment
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 38756060
DSN is the old way of setting up database connections. I would look into the ODBC namespace and use the OdbcConnection and OdbcCommand classes. You can find Sybase connection strings here:  http://www.connectionstrings.com/
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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!
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

706 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

12 Experts available now in Live!

Get 1:1 Help Now