Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Do you know where your variables are?
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Excuse me... I tried many time using your sample code for ODBC, but there is an error everytime i tried to use this code:
#!/usr/bin/perl -w use strict; use DBI; # Module connection for ODBC # Set up variables for the connection my $server_name = "shadow"; my $server_ip = "10.207.130.8:8080"; my $database_name = "Smart Response System"; my $database_user = "cs59173"; my $database_pass = "5055"; my $DSN = "driver={SQL Server};server=$server_name;tcpip=$server_ip;da +tabase=$database_name;uid=$database_user;pwd=$database_pass"; my $DBH = DBI->connect("DBI:ODBC:$DSN") or die "Couldn't open database +: $DBI::errstr\n";
The error message is:

DBI->connect(driver={SQL Server};server=shadow;tcpip=10.207.130.8;database=Smart Response System;uid=cs59173;pwd=5055) failed: MicrosoftODBC Driver Manager Invalid string or buffer length (SQL-S1090)(DBD: db_login/SQLConnect err=-1) at c:\Perl\SRS\sql.pl line 13

FIY, i have tried also sequence of examples by other monks, but also failed. Could you please help tracing the problems? Thanx a lot...

In reply to Re: Re: connecting Perl with MS SQL Server on NT using ODBC by x-c-ute-o-ner
in thread connecting Perl with MS SQL Server on NT using ODBC by peacemaker1820

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (13)
    As of 2014-04-23 19:06 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      April first is:







      Results (553 votes), past polls