473,698 Members | 2,235 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Win32 ODBC Connect - Bad File Descriptor

1 New Member
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($DS N) 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 3641
rickumali
20 New Member
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 Recognized Expert Top Contributor
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
lordspace
10 New Member
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
13640
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 the error message I am getting: Invalid attribute in connection string: Description.ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect descriptor
4
7238
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 to make ODBC calls to the db. The particular system I'm working with, will not work with an Oracle stored procedure I'm told. However, it
12
4321
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 local, but at the end of the session the front end needs to write the data to the back end on the WAN. The responsible IT manager asked me to use a ODBC linkage between the database, since this sends smalles packages of data (which minimizes the...
5
40404
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 lacation on a different machine, it tells me that the ODBC connection to 'SQL Server Name' failed. How can I create the linked table permenant no matter what machine the networked database is opened on?
0
2988
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 database.here i''m sending the coding alongwith the error i'm getting. Plz help me -----------------------code----------------------- #!c:/phpdev/perl/bin/ use Win32::ODBC; # 'data' is the name of the database i'm using
7
3058
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 2.0;HDR=NO;IMEX=2;DATABASE=C:\Test It's really easy to connect to those tables in A97. I'm having difficulties in A2003. I'm trying to follow the instructions in http://support.microsoft.com/kb/824264/.
1
4627
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 number with _fileno, but there doesn't seem to be a function to give me the handle from the descriptor number. Any ideas how I can do this?
2
11151
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 MySQL/PHP/Web server is running PHP 4.3.11, MySQL 4.0.24, and IIS. I have set a system DSN on the remote machine for the directory that contains the dbase file. The DSN name is SASIxp, and the actual file I'm trying to connect to is ADST.DBF.
4
3884
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. The following code creates a 3 column access database with colons in the column name and attempts to insert values using every combination of quote and double quote use DBI; #ppm install DBI #ppm install DBD::ODBC use...
0
9156
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9021
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8892
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8860
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7712
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3038
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2323
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.