Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to find out wether an alias belongs to view or table

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi,
To create a black-box for use with grids I need to know wether an alias is derived from a view or a table.
This is needed for I am creating an index on the fly which requires (once tablebuffering is used) a view to give tablebuffering=5. And with native tables it should be 1.
Thanks in advance for your help!
-Bart
 
ADBOBJECTS( ) Function

boyd.gif

SweetPotato Software Website
My Blog
 
Hi Bart.

I need to know wether an alias is derived from a view or a table

Code:
lnType = CURSORGETPROP( [SourceType], [MyAlias] )

lnType will give you the following info depending on what its value it:

1 – The data source is a local SQL view.

101 (1 + 100) - Cursor is created by the CursorFill method.

201 (1 + 200) - Cursor is attached to a CursorAdapter object using the CursorAttach method.

2 – The data source is a remote SQL view.

102 (2 + 100) - Cursor is created by CursorFill.

202 (2 + 200) - Cursor is attached to a CursorAdapter object using CursorAttach.

3 – The data source is a table.

103 (3 + 100) - Cursor is created by CursorFill.

203 (3 + 200) - Cursor is attached to a CursorAdapter object using CursorAttach.

4 - The cursor is based on ADO Recordset and attached to a CursorAdapter object.

104 (4 + 100) - Cursor is created by CursorFill.

204 (4 + 200) - Cursor is attached to a CursorAdapter object using CursorAttach.



Marcia G. Akins
 
Craig and Marcia,
Both thanks!
You gave me the finishing matters to craete my first faq which will be released soon.
-Bart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top