Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by cxw

  1. cxw

    Getting data from MS SQL on Win Server using Perl

    It is not clear to me on how to return the error or sucess on the query? If (my @rs = &getSQL("LMS_USER","USER_NAME,EMAIL,USER_ID,IS_GUEST,STATUS","EMAIL='$NewEmail' and STATUS='active'") <> 1){ print "fail:"; }else{ print "OK"; } Thanks, Chip
  2. cxw

    Getting data from MS SQL on Win Server using Perl

    OK I figured it out. About time I figured something out myself for a change. What I need to do is insert a \ before the @ like below: stephi.ahn\@some.com So I will format the string before searching on it. Thanks Chip
  3. cxw

    Script fail - I think it is the @ in the email address.

    Sorry, started new thread by mistake.
  4. cxw

    Getting data from MS SQL on Win Server using Perl

    OK I forgot to say that the email address comes in a CVS file and so i get it in a var. It would look somthing like this: # open file open (TXTFILE, "c:/SOARimports/NU_AD2032_ILINC_EXTRACT_stf.csv") or die("Unable to open file");; @lines = <TXTFILE>; # read file into an array foreach...
  5. cxw

    Script fail - I think it is the @ in the email address.

    OK I forgot to say that the email address comes in a CVS file and so i get it in a var. It would look somthing like this: # open file open (TXTFILE, "c:/SOARimports/NU_AD2032_ILINC_EXTRACT_stf.csv") or die("Unable to open file");; @lines = <TXTFILE>; # read file into an array foreach...
  6. cxw

    Getting data from MS SQL on Win Server using Perl

    This works fine: my @rs = &getSQL("LMS_USER","USER_NAME,EMAIL,USER_ID","USER_NAME='test1'"); However I need to find by the email address like so: my @rs = &getSQL("LMS_USER","USER_NAME,EMAIL,USER_ID","EMAIL='test1@something.com'"); How do I need to format the select statment so it will accept...
  7. cxw

    Getting data from MS SQL on Win Server using Perl

    Also to bother you more: I am traying to delete by email address. I think "@" is not a legal char in perl to use so i have tried this: my $rec = &delSQL("LMS_USER","EMAIL='<![CDATA[ameer.alam@home.com]]>'"); But it does not work. I get a script failed error. This works fine. my $rec =...
  8. cxw

    Getting data from MS SQL on Win Server using Perl

    OK how do I put the values into var? my @rs = &getSQL("LMS_USER","USER_NAME,EMAIL","USER_NAME='005861539'"); my $NewValue = "$_->{'EMAIL'}\n"; #<- how to assign to var? print "$NewValue\n"; for(@rs){ print "$_->{'EMAIL'}\n" } Thanks Chip
  9. cxw

    Getting data from MS SQL on Win Server using Perl

    Wow! I am impressed. This module worked on the first try! This makes life a lot easier and it is Friday to boot. Thanks so much for taking the time to help out. Hope I can return the favor to some one. Chip
  10. cxw

    Getting data from MS SQL on Win Server using Perl

    Now that would be great! Thanks, Chip
  11. cxw

    Getting data from MS SQL on Win Server using Perl

    OK I tried your line of code but it does not print out anything to the web page. We are running Windows 2003 server with IIS. The web site that I am working with is written in Perl. Why does perl not print the errors? Am I missing a module? The web site is a distant learning piece of software...
  12. cxw

    Getting data from MS SQL on Win Server using Perl

    Do you use Win32 ODBC in a web page .pl? Can you send me some sample code? A simple select statement and a retrieval of a filed printed to the web page? Much appreciated. I have ordered another book "Programming the Perl DBI [Illustrated] [Paperback] by Bunce, Tim because the first one...
  13. cxw

    Getting data from MS SQL on Win Server using Perl

    I have ordered the book: Real World SQL Server Administration with Perl hoping that it will shed some light on getting data from SQL. I have also been looking for the DBI docs in Perl but have not found them. time to google them. Thanks, Chip
  14. cxw

    Getting data from MS SQL on Win Server using Perl

    OK it looks like the code I found on the web (this code I am trying to use, is PHP not Perl). It looked like Perl to me but then what do I know I am a beginner in Perl. That is what DB_Sql is, a part of PHP. "PHPlib also has several helper classes, prominent amongst them are the DB_sql...
  15. cxw

    Getting data from MS SQL on Win Server using Perl

    I googled an article on DB_Sql and am looking to see if it is part of Perl or what it is. Also why would it be needed in this code? DB_Sql Examples Use a subclass to provide the appropriate parameters for a database connect. You may overwrite halt() to customize the error message, although a...

Part and Inventory Search

Back
Top