Passing complete SQL scripts thru DBI...

From: Amonotod (amonotod_at_charter.net)
Date: 07/29/04

  • Next message: Amonotod: "Re: Passing complete SQL scripts thru DBI..."
    To: <dbi-users@perl.org>
    Date: Thu, 29 Jul 2004 19:25:02 +0000
    
    

    Howdy,
      So, I've got these heavy duty, complicated T|PL-sql scripts, that I have to pass through to my DB, after I finish populating it. They come complete with temporary tables, EXEC statements, stored procedure create/drop statements, select into's, nested cursors and procedures, you name, I'm using it. Right now, I'm trying to get the T-SQL script to run in MS SQL 2K, and it's failing with various errors. I've tried both do() and prepare()/execute, with no success. prepare()/execute gives me:

    DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server Driver]Invalid cursor state (SQL-24000)(DBD: dbd_describe/SQLN
    umResultCols err=-1) at D:\development\dbd_db.pl line 487, <QUERY> line 165.

      and do() gives no error, but does not seem to have succeeded in populating this last lookup table that the script is supposed to create...

    So, any pointers, advice are appreciated...

    Thanks,
    amonotod

    --
        `\|||/         amonotod@    | sun|perl|windows
          (@@)         charter.net  | sysadmin|dba
      ooO_(_)_Ooo____________________________________
      _____|_____|_____|_____|_____|_____|_____|_____|
    

  • Next message: Amonotod: "Re: Passing complete SQL scripts thru DBI..."

    Relevant Pages

    • Local Admin Password Change Scripting
      ... Can anyone help me with creating a script to change local administrator ... passwords using a lookup file? ... The basic idea that I would like to achieve is to have a lookup word 10 ...
      (microsoft.public.security)
    • Re: self join problem
      ... calculation fields. ... Lookup() function to pull in the data I need to calculate whether the ... Refresh Window script step, with the Flush Cached Join Results option ...
      (comp.databases.filemaker)
    • Re: LDAP attributes for importing contacts
      ... You're not populating the mailNickname attribute. ... here's what I have in an old script: ... Bharat Suneja ...
      (microsoft.public.exchange.admin)
    • Re: self join problem
      ... Lookup() function to pull in the data I need to calculate whether the ... One way is to use a plug-in that triggers a script (such as the free ... user changes the field, then goes to another record, the script gets ... the field then closes the file - it doesn't trigger the script while ...
      (comp.databases.filemaker)
    • Re: Do Loop
      ... > The script below, as I see it in my newsreader, seems to continue statements ... > If MyVar = vbYes Then ... > Call GetUserInput ... >> populating them based on the users input. ...
      (microsoft.public.scripting.vbscript)