How to retrieve all the rows of a system table whose TABLE_SCHEMA is sys and whose database is master/tempdb ?
- From: "Kent Sie" <info@xxxxxxxxxxxxx>
- Date: Sun, 29 Oct 2006 16:45:07 +0800
Question
How to retrieve all the rows of a system table whose TABLE_SCHEMA is sys
and whose database is master/tempdb from SQL Server Express 2005
using OLE DB Provider for SQL Native Client?
Method One
1. retrieve all column names using OpenSchema(adSchemaColumns,varData)
2. use SELECT c1, c2, c3, ... , cN FROM sys.system_table_name
Method Two
1. use SELECT * FROM sys.system_table_name
I have tried using the above two methods without success.
Did I miss something ?
Do I need any special permission to open a particular system table ?
Method Three
1. use m_pRecordset->Open((LPCTSTR)strSystemTableName,
_variant_t((IDispatch*)mpdb, TRUE),
adOpenForwardOnly, adLockReadOnly, adCmdTable);
I do not wish to use method three. Are there any other solutions to my
concern?
Thank you very much for your reply.
.
- Prev by Date: Re: InsertParameters.Add doesn't work in ASP.NET
- Previous by thread: Re: CONVERT Function in ASPX
- Index(es):
Relevant Pages
|
|