Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting all records just for the schema
Message
From
06/04/2007 13:46:50
 
 
To
All
General information
Forum:
ASP.NET
Category:
Databases
Title:
Getting all records just for the schema
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01213027
Message ID:
01213027
Views:
59
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
Next
Reply
Map
View

Click here to load this message in the networking platform