I suspect that you aren't connecting to the dsn correctly from your XP box. Hence, after the first line, the object $db is undefined. Something like:
in reply to WIn32::ODBC - Can't call method "SqL" on an undefined value on XP machine
or something like that. From the Win32::ODBC doc
my $db = new Win32::ODBC("dsn=A3T;UID=shenriks;PWD=changeme0");
die "Cannot connect to dsn A3T" unless ( defined $db );
Next, create a data connection to your DSN:
Also, look into code tags for your posts. See this node 17558 for more details.
Updated: added link to writeup formatting node
NOTE: MyDSN can be either the DSN as defined in the ODBC Administrator, or it can be an honest-to-God DSN Connect String.
Example: "DSN=My Database;UID=Brown Cow;PWD=Moo;"
You should check to see if $Data is indeed defined, otherwise there has been an error.
$Data = new Win32::ODBC("MyDSN");