Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting all records just for the schema
Message
De
06/04/2007 13:46:50
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
Getting all records just for the schema
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01213027
Message ID:
01213027
Vues:
60
On all examples I see on the Internet, when comes time to get the schema of a table, there is always an example like this:
'Retrieve records from the Employees table into a DataReader.
cmd.Connection = cn
cmd.CommandText = "SELECT * FROM Employees"
myReader = cmd.ExecuteReader(CommandBehavior.KeyInfo)
I am always asking myself, what is the need to retrieve all records of the table just to get the schema. In my case, I always use a SQL such as:
Select * From Employees WHERE 1=2
Or, is it that the ExecuteReader() command is not retrieving the records but only uses its syntax to get the schema?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform