Beefy Boxes and Bandwidth Generously Provided by pair Networks Russ
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Limitations of DBI (or) DBD::ODBC ?

by inman (Curate)
on Oct 10, 2005 at 10:21 UTC ( [id://498809]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Limitations of DBI (or) DBD::ODBC ?

Are you specifying your script in double quotes? If you are then Perl will try and interpolate the string and automatically expand out what it thinks are the Perl variables @intpos etc. Try using strict and warnings. escape any text that looks like a Perl variable that you don't want to be interpolated. the same is true for 'here document' syntax. E.g.
my $script = <<EOF; declare \@intpos int declare \@intuser int declare \@dtlastpost varchar(30) set \@intuser = (select userid from $dbname.dbo.users where name = '$u +ser') set \@intpos = (select top 1 permissionid from $dbname.dbo.security wh +ere userid = \@intuser order by permissionid desc) set \@dtlastpost = (SELECT top 1 PostDate FROM $dbname.dbo.Messages wh +ere userid = @intuser order by postdate desc ) EOF
In the example above I have assumed that you want to interpolate $dbname and $user.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://498809]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.