Re: POLOROIDS OF YOUR WIFE..
Posted in 1999
From: anandpa@my-deja.com > >Dear kblume9944, This one is going to run and run... > Follow the below advise to insert your wife's >poloroids into Informix database or for that matter >anywhere.. > > 1. Declare your host variable, ready to insert. Don't forget to make it thread safe! > 2. If your wife's polo... is big, declare it as BLOB, if it is tiny >declare as small Polo? As in a mint? No, let's not go there... > 3. Prepare your wife's polo... And your INSERT CURSOR! > 4. If you want to insert several time, declare a cursor, that way it >will be faster and performance better. You should *always* use an INSERT CURSOR. You never know when one INSERT can turn into many. > 5. Open the Cursor.. > 6. Go into a forever loop to do the following.. Forever? Ah, those sweet halcyon days of my youth...when I could do data maintenance all night long...<sigh> > 7. Check for error in opening the Cursor. > 8. If error, try opening again until successful in opening.. Just make sure you're opening the right one! Opening the wrong CURSOR can lead to unexpected results! > 9. Once opened, you are ready.. > 10. Execute the Insert statement, using your host variable.. > 11. If you insert successfully continue, or else continue anyway. Spoken like a true gentleman! > 12. Don't remember to close the cursor, and don't free it. > 13. don't release your host variable either. You will probably have to tidy up after a suitable INTERVAL. After a while, your INSERT CURSOR will run out of data to process. > Hope this helps. >For better efficiency use stored procedure next time. And remember to do careful handling of the INSERT host variables or you might RAISE an unexpected EXCEPTION. In which case you will either have to perform an unpleasant DELETE or prepare for some nasty UPDATEs. Which could be considered expensive in terms of resources required. ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com