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...
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|