473,513 Members | 2,881 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Win32::ODBC with Perl

2 New Member
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

$db = new Win32::ODBC("data");

if(! $db ) {

print "Error - data database not found! \n";

}
else {
print "Present \n ";
}

@tables = $db->TableList();

printf ("I found these tables: %s \n", join(" ", @tables));

$db->Sql("SELECT * FROM tbl") || die "Can't execute \n";

-----------------------code-finish-----------------------

-----------------------Output--------------------------
Present
I found these tables: tbl
Can't execute
--------------------------------------------------------

here database has table with name tbl which is found.


Sethi
Apr 28 '06 #1
0 2971

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

Similar topics

1
1388
by: Sven | last post by:
HI all, is there a way to call my own VB Procedure from a .NET Application using ODBC ? I tried different ways like: SELECT myProc() FROM... SELECT { fn myProc()} FROM... SELECT { call myProc()} FROM... SELECT { exec myProc()} FROM...
0
8485
by: Alan White | last post by:
Hello, I need to read the excel file using Odbc, but when I run my code, I got the following error: "Error: ERROR Data source name not found and no default driver specified" Could someone please tell me what is wrong with this?. Here is the code I use to read the file. I already include the Microsoft.Data.Odbc and add reference to...
2
16815
by: Scott M. Lyon | last post by:
I currently am working on a VB.NET application that imports data from an Excel spreadsheet that the customer filled in. I used the following code to use ODBC to read the data from the spreadsheet, and return it in a datatable. Public Function ReadExcelDT(ByVal aFileName As String) As DataTable ' Open the Excel Spreadsheet, and using...
2
9370
by: 111mike | last post by:
Hello, Here's my problem. I cannot connect to mysql database using odbc string connections or dns. I keep getting a "cannot connect to mysql server localhost." I'm running windows XP Pro and have installed IIS as my server. I have installed Mysql 5.0 and mysql ODBC driver 3.51.12 in their default locations. Database is up and running...
5
1712
by: rag84dec | last post by:
Old Title: Someone please send the link to Win32::ODBC please hi, I want to work on Datababase programs thru perl. I tried with DBI but i am unable to install DBI and DBD. So someone pls help me in getting the ODBC module for perl. pls tell me the procedue also.
1
2003
rajiv07
by: rajiv07 | last post by:
Hi to all, I have use Win32::ODBC module to access Ms Access database.Here the Date Is not getting update.Could u Tell me the date format to update. So for I have tried.. $q="update trackinfo set expdate='2007-08-29' where trackid='6'"; $db->Sql($q); Thank You
3
5210
by: Suresh P | last post by:
Hi All, I tried to access the mysql database in ODBC using ip address and username/password. It returns, "cannot connect to MySQL server on IP ADDRESS(10060)". This could be related to Firewall on the server. Is there anyway to access MySQL database using ODBC without opening port 3306?
3
2313
by: Max58kl | last post by:
Trying to access data and print it to the screen using Perl Builders I/O Window -------------------------------------------------------------------------------- Hi I am using a program called Perl Builder which is an Integrated Development Environment for Perl scripting. I am trying to access the data in a txt file and then print the...
2
5841
by: pramodkh | last post by:
Hi All I am parsing a word doc using perl. I am using Win32::OLE module for this. I am able to get the Paragraphs/styles/Text from the word doc. But facing some problem when I am trying to get a Text with Bullets/numbering. It Only displays the text, but i want to get the bullet number also from the text line. I am not getting the...
0
7269
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7177
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7394
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. ...
0
7559
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...
0
7542
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...
0
5701
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...
0
3237
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
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...

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.