473,320 Members | 1,876 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,320 software developers and data experts.

DBI Module

45
Hi

I Am Just A Beginer Of Perl.. I Just Want My Perl Coding To Connect To A Database... For Which They Specify I Need To Create A Dbi Module Can U Help Me In Creating A Dbi Module
Feb 19 '07 #1
15 2175
miller
1,089 Expert 1GB
You do not need to create a DBI Module to connect to a database. You simply need to install the module provided by CPAN.

http://search.cpan.org/search?query=DBI
Feb 19 '07 #2
SAIRAAM
45
referred that website but my system says its not able to download dbi module what am i to do
Feb 20 '07 #3
SAIRAAM
45
I Want To Know About Packages... That Is How Can I Save Pm Files And Pl Files... How Am I To Run Them Separetely.....
Where I Need To Store Them In My Folder......
Feb 20 '07 #4
SAIRAAM
45
Hello Can Any One Help Me In Telling How Packages Can Be Saved And Compiled In Perl... That Is How Should I Save A Pm File And Pl File... Do These Files Need To Be Saved In Same Folder... It Would Helpful If I Gety Clear Idea As I Dont Know Any Issues In This From Scrap...
Feb 20 '07 #5
SAIRAAM
45
Can U Help Me Out In How To Deal With Packeges In Perl..
That Is How Should I Save A .pm Extension File And .pl Extension File.... As I Am Totally New It Would Be If The Details Are Simple...and Very Easy Top Understand.....
Feb 20 '07 #6
Hi.
For the creation of .pm files look at the following site:

http://www.perlmonks.org/index.pl?node_id=431702

:
For the directory to put your module:
1. you can put in any directory.
2. The directory should be appended to the '@INC' variable
Feb 21 '07 #7
KevinADC
4,059 Expert 2GB
Asking the same question over and over is not going to get a reply.

First, you don't need to compile perl modules or perl scripts.

Second, the question is a bit out of the scope of a help forum. Get some perl references and start reading is my best suggestion. "Perl BookShelf References" on CD is a good source of information.
Feb 21 '07 #8
SAIRAAM
45
Hi Vpmurdan...

I Referred To The Site U Refered To... Saw How Module Has To Be Created... Can U Guide Me As To How I Can Use The Existing Module... Eg Dbi Module.. And Secondly U Suggested Me To Append My Directory To @inc. Can U Suggest How Can I Do That... .
Feb 21 '07 #9
For appending to @INC: Type the following code in a command-line perl to see how the append works and apply to your program:

Expand|Select|Wrap|Line Numbers
  1. print @INC;
  2. push(@INC, "c:/prakash/temp");
  3. print @INC;
  4.  
  5. Ctrl+d
  6.  

For using a module:
use the following:

Expand|Select|Wrap|Line Numbers
  1. use moduleName;
  2.  
Just see any sample
Feb 22 '07 #10
miller
1,089 Expert 1GB
For appending to @INC: Type the following code in a command-line perl to see how the append works and apply to your program:

Expand|Select|Wrap|Line Numbers
  1. print @INC;
  2. push(@INC, "c:/prakash/temp");
  3. print @INC;
  4.  
  5. Ctrl+d
  6.  
Unless there is a specific reason why you need to modify the @INC at runtime, do not use this method for adding a directory to the @INC.

Instead, always use the lib pragma. This is performed at compile time, and does a few sanity checks that you can read about in the included link to the documentation:

Expand|Select|Wrap|Line Numbers
  1. use lib "c:/prakash/temp";
  2.  
Feb 22 '07 #11
SAIRAAM
45
I Have Downloaded A Dbi Module... Can Anyone Help Me Saying Where Am I To Put That Module So That I Can Access It For My Perl Program
Feb 23 '07 #12
I Have Downloaded A Dbi Module... Can Anyone Help Me Saying Where Am I To Put That Module So That I Can Access It For My Perl Program
You should read the documentation supplied with the module.
Expand|Select|Wrap|Line Numbers
  1. gunzip <module>.tar.gz
  2. tar xvf <module>.tar
  3. cd <module>
  4. perl Makefile.PL
  5. make
  6. make test
  7. make install
Greetz, Doc
Feb 23 '07 #13
SAIRAAM
45
Sir I Tried Ur Code But It Shows Some Error Where Am I To Type This Code.... Should A Perl Script Be Created For Installation Of Dbi Module.... Can U Suggest Some Idea...
Feb 27 '07 #14
SAIRAAM
45
SIR I GOT TILL writing makefile for dbi..... after which when i try to execute these three lines of code it says

make
make test
make install

when i type make it says not recognised as internel or external command,operable file or batch file.......what should i do.... can u suggest me..
Feb 27 '07 #15
SAIRAAM
45
i have downloaded a dbi module. and want to install it in my system.. for which i got sequence of steps... in that i successfully finished running makefile.pl and writing makefile for dbi.....after which when i try to execute these three lines of code it says

make
make test
make install

when i type make in the command prompt it says not recognised as internel or external command,operable file or batch file.......what should i do.... can u suggest me some solution
Mar 2 '07 #16

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

Similar topics

8
by: Bo Peng | last post by:
Dear list, I am writing a Python extension module that needs a way to expose pieces of a big C array to python. Currently, I am using NumPy like the following: PyObject* res =...
8
by: Irmen de Jong | last post by:
What would be the best way, if any, to obtain the bytecode for a given loaded module? I can get the source: import inspect import os src = inspect.getsource(os) but there is no...
5
by: dody suria wijaya | last post by:
I found this problem when trying to split a module into two. Here's an example: ============== #Module a (a.py): from b import * class Main: pass ============== ==============
3
by: David T. Ashley | last post by:
Hi, Red Hat Enterprise Linux 4.X. I'm writing command-line PHP scripts for the first time. I get the messages below. What do they mean? Are these operating system library modules, or...
10
by: Bonzol | last post by:
vb.net Hey there, could someone just tell me what the differnce is between classes and modules and when each one would be used compared to the other? Any help would be great Thanx in...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
40
by: rjcarr | last post by:
Sorry if this is a completely newbie question ... I was trying to get information about the logging.handlers module, so I imported logging, and tried dir(logging.handlers), but got: ...
4
by: rkmr.em | last post by:
Hi I have a function data, that I need to import from a file data, in the directory data If I do this from python interactive shell (linux fedora core 8) from dir /home/mark it works fine: ...
0
by: Fredrik Lundh | last post by:
Jeff Dyke wrote: so how did that processing use the "mymodulename" name? the calling method has nothing to do with what's considered to be a local variable in the method being called, so...
6
by: dudeja.rajat | last post by:
Hi, I found on the net that there is something called module initialization. Unfortunately, there is not much information for this. However, small the information I found module initialization...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.