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...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.