Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I find out, if database (@DataBaseName) exists?
Message
 
 
À
06/03/2003 12:28:32
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00761718
Message ID:
00762325
Vues:
14
>I tend to think this method is faster than querying the schema, although that may be what's happening in the backgroud anyway.
>
>It certainly makes the code more readable.
>
>BOb

Exactly and I think, you're right. But Sergey explained to me, that I'm too "defensive" and all these checks are overkill anyway. If you would try to insert records to non-existing database, you would have an error anyway, which is trapped in my procedure... So, checking for tables and databases may be an overkill.

And I also didn't need to split database by state, as we currently have in VFP. I'm so glad, that one fresh look changed my narrow oriented perspective. And it would indeed make everything much easier...
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform