Can't call method "Fields" on unblessed reference #### my $SQLstring = "SELECT * FROM table WHERE field1='"; my $filter = $Request->Form('USERFIELD')->$Item(); # this is taken directly out of the pages of # the O'Reilly Book CGI Programming. # I try to "clean up" the data that was entered # by the user and then take that # 'untainted data' out of a system variable # # the program dosen't work with or without this statement $filter=~ /^([\w.])$/; $filter = $1; $SQLstring .= $filter my $Provider = "SQLOLEDB"; my $ConnectString = "driver={SQL Server};server=SRVR;database=DB"; my $Conn = $Server->CreateObject("ADODB.Connection"); $Conn->Open($ConnectString); my $RS = $Conn->Execute( "$SQLstring" ); # this is the line on which the error occurs while ( ! $RS->{EOF} ) { $Response->Write($RS->Fields(0)->{Value}); $RS->MoveNext; } $RS->close;