Results 1 to 3 of 3

Thread: DBI to ASP

  1. #1
    Join Date
    Mar 2002

    Unanswered: DBI to ASP

    This isn't really a DBI issue, more like a PerlScript/ASP issue, but I thought this might be the best place to pose th equestion.

    I am converting several data base modules from Perl CGI to PerlScript and have run into the following problem. When I execute an SQL command to update or delete records from a table, I want to know how many records (if any) were affected. According to the ASP documentation dealing with the Execute method for the connection object, the following should do the trick:

    $do_sql = $db->Execute($sql_cmd, $recs_affected);

    However, while the statement executes fine (as always), the variable $recs_affected never contains a value. I have tried changing the statement to the following:

    $do_sql = $db->Execute($sql_cmd, \$recs_affected);

    thinking that maybe an address was needed insted. According to the ASP

    documentation Execute is looking for a "long value" as this parameter. The following code works fine under VBScript:

    do_sql = db.Execute(sql_cmd, recs_affected)

    I was just wondering if anyone has run across this problem, and if there is a solution.



  2. #2
    Join Date
    Apr 2002
    $db->execute returns the number of rows processed for all operations other than SELECT.


  3. #3
    Join Date
    Jan 2004

    Re: DBI to ASP


    You look like an expert on ASP/PerlScript..I am just getting into it and I was looking for a way to connect to an oracle database using ODBC or OO4O.

    How do I pass the tnsname, username and password to get connected to an oracle db?

    Your help will me much appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts