Rabu, 04 Februari 2009

Executing SQL Server Stored Procedure from Perl - Setup Perl and SQL Server on Windows




Perl’s running environment is integrated within the *nix system. For Microsoft Windows operating systems, however, you need to download and install it by yourself.

There are a few Windows-based distributions of Perl. ActivePerl from ActiveState.com may be the most popular one. You can download it from:

http://www.activestate.com/Products/ActivePerl/

Choose the latest version of ActivePerl (5.8) (most recent Unix/Linux also uses Perl 5.8).

Installing ActivePerl on Windows is fairly easy. After installation you can use the following command to verify that perl is working:

From command prompt, input:

Perl –v

It will show you something like:

This is perl, v5.8.0 built for MSWin32-x86-multi-thread
Copyright 1987-2002, Larry Wall

Download Sybase Adaptive Server 12.5 Developer Edition from the Sybase website for free: www.sybase.com/ase_125devel

Installing and configuring Sybase Adaptive Server is also as easy as MS SQL Server.

If you want to use MS SQL Server as a database, install MS SQL Server 7.0 with service pack 2.

Perl uses DBI/DBD architecture to access databases (DBI means Database Interface, DBD means Database Driver). With a specific DBD driver installed, Perl can use the same DBI API to support different database systems.

The DBI module is already installed with the ActivePerl distribution itself. In order to support SQL Server, we need to download the SQL Server DBD driver from cpan.org: www.cpan.org, search for the DBD-Sybase module, and download the latest version 1.01 source code: DBD-Sybase-1.01.tar.gz

Note: there are a few other DBD Drivers that support both Sybase and Microsoft SQL Server on Windows, such as DBD::ADO; however, they can only be used on a Windows platform.

In order to compile and install the DBD::Sybase source code, we need a C compiler installed on Windows (I use Microsoft Visual C++ 6.0), and make sure nmake.exe is available in the PATH.

Use a decompression utility (ie: Winzip) to extract DBD-Sybase-1.0.1.tar.gz to any available drive such as C:. You should now have the folder c:DBD-Sybase-1.01 that holds all the source code.

Change directory to the above folder, and issue the following command in the command prompt window:

Perl Makefile.PL

You may receive a warning message, such as missing the following library: libtcl.lib, libcomn.lib and libintl.lib.

Because we are using the Sybase CT-Library, libcs.lib and libct.lib are mandatory; others are optional, and we can ignore this warning. Sybase removes these static libraries from its version 12.5 of the Adaptive Server package. The run time libraries still do exist (ie: libtcl.dll, libcomn.dll, linintl.dll) See the following screenshot:





source :http://www.devarticles.com


----------------------------------------------

tampilkan-data

transfer-login

tutorial-mysql

visitor-online

tip xampp-security

tips Choose IP

tips stopping unwanted e-mail

tip protect against

tips preventing nimda worm

wood-tips

tips imda worm

wood-tips

mengiringsearchengine

Trik member-area

Trik Membuat-halman next

Trik membuat-security-code

Trik mengecek-karakter

Trik merubah-pswd root

Trik Noise-dimouse

Trik penerapan BUG

Trik penggabungan-2web

Trik perkenalan-dengan-php

Trik PHP-Login-script

Trik PHP-Tutorial