From: Ramprasad <[EMAIL PROTECTED]> > You are right it is weird. But just a test script to learn DBI. What I > really want is how Can I use prepare and execute which I think is > better than doing a do every time If my table name keeps changing > > Is a prepare statement always specific to a table in a database ?
No and yes. I think that maybe DBD::AnyData does allow prepare with a placeholder for the table name, but no "real" database does. The query execution plan (the way the database will search for the rows that match all the requirements, what indexes will be used, what types of table merges, etc.) depends heavily on the table(s) used. Therefore it would not really make sense to prepare something you can't generate an execution plan for. The best you can get is to create several statement handles and prepare the statement for each table separately. Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]