473,396 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Win32 ODBC Connect - Bad File Descriptor

Hi there,

I am using Perl 5.8 with Apache 2.2 on Win XP SP2, all configured and working fine. I am able to run perl programs from command prompt. I am also able to call CGI scripts from HTML pages using Apache and it works fine.

The problem is with the database connectivity using WIN32::ODBC. Look at the following code:

my $DSN = "ABC";
my $connection = new Win32::ODBC($DSN) or die "Could not open connection to DSN because of [$!]";

It works perfectly fine from command prompt. I am even able to fire queries and display the results but the same code gives me "Bad File Descriptor" when run from the website (CGI script called from an HTML page).

Have tried so many things but could not get through this.

Kindly advise.
Mar 15 '07 #1
3 3590
I was "trying this out" for myself, looking up resources on the web, when I encountered this:

I Can Access DSN from Command Line, Not Web/CGI

Give this a try! Good luck!
Apr 1 '07 #2
miller
1,089 Expert 1GB
I was "trying this out" for myself, looking up resources on the web, when I encountered this:

I Can Access DSN from Command Line, Not Web/CGI

Give this a try! Good luck!
I have no experience with ODBC, but I took a look at Rick's link and it is very possibly exactly what you need. The page anchor doesn't appear to work, so just scroll down until you see the header that he's included.

- Miller
Apr 1 '07 #3
The previous link is very useful :)

You have to configure Data Source Name.

Start -> Control Panel -> Administrative Tools -> Data Sources (ODBC)
click on tab: ["System DSN"] Fill the Required Data
Apr 2 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: GitarJake | last post by:
Hello all, I am trying to test an ODBC connection to an Oracle dbf using the ODBC Data Source Administrator. It's not working and I suspect I haven't configured Oracle correctly. Below is...
4
by: Roger Redford | last post by:
Dear Experts, I'm attempting to marry a system to an Oracle 817 datbase. Oracle is my specialty, the back end mainly, so I don't know much about java or javascript. The system uses javascript...
12
by: Remco Groot Beumer | last post by:
Hello all, Currently we are implementing an Access database which has to send some (not much) data over a WAN. We are using an Access front end and an Access back end. Basicly the front end runs...
5
by: Alec | last post by:
Hi All, I am currently trying to link in Access 97 to a table in a MSSQL 7 server. Initially the link is fine, however, when I close the access database and re-open it from the same network...
0
by: sethi | last post by:
Hi i m working on my high school project and trying to connect to MS Access database by using Perl though i 'm able to connect with the databse but was unable to extract data from the table in the...
7
by: Salad | last post by:
I am converting an application from A97 to A2003. I have 2 tables created by another application as a Foxpro.dbf. The table has no index. The connect string in A97 is FoxPro...
1
by: PLS | last post by:
I'm writing native C++ using VS2005. I have a FILE* for a file opened with fopen. I want to get the WIN32 file handle for this file so I can call GetFileTime on it. I can get the descriptor...
2
by: bcbrock | last post by:
I am trying to figure out how to query some data out of a dbase IV (.dbf) file sitting on a remote server from my MySQL/PHP/Web Server. Both servers are Windows Server 2003 SP2. My...
4
BeemerBiker
by: BeemerBiker | last post by:
I can create an access database with a colon in the field name, but I cant access it. I tried escaping the colon with single, double quotes and the backslash but didnt find a combo that worked. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.