?
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
Medium Priority
?
473 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
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 is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

718 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