Professional Web Applications Themes

porting to windows NT - PERL Beginners

Howdy: I want to move my perl script from Linux to Windows NT. The Linux script connects to Oracle via the DBI modules I have installed. I want to do the same on NT, but I'm not sure if the connection strings / values are the same. In the linux script: [snip] use strict; use diagnostics; use DBI; use POSIX 'strftime'; my $host='192.168.1.100'; my $sid='testdb'; my $username='scott'; my $password='tiger'; my $datestr=strftime '%d%m%Y',localtime; # connection option my $dbh = DBI->connect("dbi:Oracle:host=$host;sid=$sid", $username, $password, { RaiseError => 1 }) or die "Can not connect: $!"; [/snip] Win:32 errors: [errors] D:\test\tmo_connect>test.pl Use of uninitialized ...

  1. #1

    Default porting to windows NT

    Howdy:

    I want to move my perl script from Linux to Windows NT.
    The Linux script connects to Oracle via the DBI modules I
    have installed. I want to do the same on NT, but I'm not
    sure if the connection strings / values are the same.

    In the linux script:

    [snip]
    use strict;
    use diagnostics;
    use DBI;
    use POSIX 'strftime';

    my $host='192.168.1.100';
    my $sid='testdb';
    my $username='scott';
    my $password='tiger';
    my $datestr=strftime '%d%m%Y',localtime;

    # connection option
    my $dbh = DBI->connect("dbi:Oracle:host=$host;sid=$sid", $username,
    $password, { RaiseError => 1 }) or die "Can not connect: $!";
    [/snip]

    Win:32 errors:

    [errors]
    D:\test\tmo_connect>test.pl
    Use of uninitialized value in concatenation (.) or string at
    D:/Perl/site/lib/DBI.pm line 584.
    DBI connect('host=192.168.1.100;sid=testdb','scott',.. .) failed: at
    D:\test\tmo_connect\test.pl line 19
    Can not connect: at D:\test\tmo_connect\test.pl line 19.
    [/errors]

    Should this be the same? I had installed DBI 1.37 via
    the ppm install DBI.ppd method. Looking at the 'query'
    option, it says that DBI is installed and 'verify' says
    it's up to date.

    Question: Is there an example of how to connect to Oracle
    (version 9.2.0.1) via Win:32?

    Basically, what am I doing wrong?

    Thanks in advance!

    -X

    Shaunn Johnson Guest

  2. #2

    Default Re: porting to windows NT

    From: "Johnson, Shaunn" <SJohnson6bcbsm.com>
    > I want to move my perl script from Linux to Windows NT.
    > The Linux script connects to Oracle via the DBI modules I
    > have installed. I want to do the same on NT, but I'm not
    > sure if the connection strings / values are the same.
    They should be.
    > Should this be the same? I had installed DBI 1.37 via
    > the ppm install DBI.ppd method. Looking at the 'query'
    > option, it says that DBI is installed and 'verify' says
    > it's up to date.
    Is also DBD::Oracle installed?

    Jenda
    ===== [email]JendaKrynicky.cz[/email] === [url]http://Jenda.Krynicky.cz[/url] =====
    When it comes to wine, women and song, wizards are allowed
    to get drunk and croon as much as they like.
    -- Terry Pratchett in Sourcery

    Jenda Krynicky Guest

  3. #3

    Default Re: porting to windows NT

    Try running dbish or dbish.bat from the cmdline. It usually comes as part
    of the dbi install and will tell you what drivers you've got and will let
    you select, connect, and try out some SQL there. You can fine-tune your
    params with it.



    At 09:05 PM 1/26/04 +0100, you wrote:
    >From: "Johnson, Shaunn" <SJohnson6bcbsm.com>
    > > I want to move my perl script from Linux to Windows NT.
    > > The Linux script connects to Oracle via the DBI modules I
    > > have installed. I want to do the same on NT, but I'm not
    > > sure if the connection strings / values are the same.
    >
    >They should be.
    >
    > > Should this be the same? I had installed DBI 1.37 via
    > > the ppm install DBI.ppd method. Looking at the 'query'
    > > option, it says that DBI is installed and 'verify' says
    > > it's up to date.
    >
    >Is also DBD::Oracle installed?
    >
    >Jenda
    >===== [email]JendaKrynicky.cz[/email] === [url]http://Jenda.Krynicky.cz[/url] =====
    >When it comes to wine, women and song, wizards are allowed
    >to get drunk and croon as much as they like.
    > -- Terry Pratchett in Sourcery
    >
    >
    >--
    >To unsubscribe, e-mail: [email]beginners-unsubscribeperl.org[/email]
    >For additional commands, e-mail: [email]beginners-helpperl.org[/email]
    ><http://learn.perl.org/> <http://learn.perl.org/first-response>
    Tim Guest

  4. #4

    Default Re: porting to windows NT

    "Johnson, Shaunn" wrote:
    > Howdy:
    >
    > I want to move my perl script from Linux to Windows NT.
    > The Linux script connects to Oracle via the DBI modules I
    > have installed. I want to do the same on NT, but I'm not
    > sure if the connection strings / values are the same.
    >
    > In the linux script:
    >
    > [snip]
    > use strict;
    > use diagnostics;
    > use DBI;
    > use POSIX 'strftime';
    >
    > my $host='192.168.1.100';
    > my $sid='testdb';
    > my $username='scott';
    > my $password='tiger';
    > my $datestr=strftime '%d%m%Y',localtime;
    >
    > # connection option
    > my $dbh = DBI->connect("dbi:Oracle:host=$host;sid=$sid", $username,
    > $password, { RaiseError => 1 }) or die "Can not connect: $!";
    > [/snip]
    >
    > Win:32 errors:
    >
    > [errors]
    > D:\test\tmo_connect>test.pl
    > Use of uninitialized value in concatenation (.) or string at
    > D:/Perl/site/lib/DBI.pm line 584.
    > DBI connect('host=192.168.1.100;sid=testdb','scott',.. .) failed: at
    > D:\test\tmo_connect\test.pl line 19
    > Can not connect: at D:\test\tmo_connect\test.pl line 19.
    > [/errors]
    It's way too early to be looking at system errors. You could waste a
    lot of time casting about in the wrong direction.

    First isolate which variables are undefined by taking the name-value
    pairs in the connect line, assembling them and printing them one-by-one,
    and see which one raises this unitinitialized variable warning. That
    will give you a better idea of which part of the constructor call is
    missing its intial value.

    Joseph

    R. Joseph Newton Guest

Similar Threads

  1. Porting from CS to 10... can it work?
    By JeffreyBower@adobeforums.com in forum Adobe Illustrator Windows
    Replies: 3
    Last Post: April 13th, 03:40 PM
  2. "TIESCALAR" symbol - porting THD7.pm to Windows
    By Kevin in Chicago in forum PERL Modules
    Replies: 0
    Last Post: January 3rd, 04:36 PM
  3. Help need to porting from MS SQL to DB2 8.1
    By James Hong in forum IBM DB2
    Replies: 5
    Last Post: September 25th, 09:29 AM
  4. porting to pc
    By cwf prod webforumsuser@macromedia.com in forum Macromedia Director Basics
    Replies: 1
    Last Post: August 12th, 02:56 PM
  5. Porting code to Mac
    By Stephen Fraser in forum Mac Programming
    Replies: 2
    Last Post: August 3rd, 04:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139