|
-
September 22nd, 2010, 04:28 AM
#1
Same table names within ADO.Recordset
Hello everyone.
First of all: Sorry for my English.
I'm deal with Access, ADO (msado2), Visual Basic 6.0. I've got joinin' one table to itself (like this tabTable INNER JOIN tabTable As tabTable1 ON tabTable.ptrParent = tabTable1.Key) in my query.
I want get recordset "schema" like this:
tabTable.Caption
tabTable.Description
tabTable1.Caption
tabTable1.Description
I'm facin' a problem: there's no a propperty within a ADO-recordset wich sais me Alias-table name. It's only BASETABLENAME exist.
Please help me to get the "schema" (c. above) programmatically.
-
September 22nd, 2010, 05:37 AM
#2
Re: Same table names within ADO.Recordset
Code:
SELECT
tabTable.Caption AS TableCaption,
tabTable.Description AS TableDescription,
tabTable1.Caption AS Table1Caption,
tabTable1.Description AS Table1Description
...
Victor Nijegorodov
-
September 22nd, 2010, 10:37 AM
#3
Re: Same table names within ADO.Recordset
Thank u for answer, Viktor.
It's not the answer I expected to recieve.
I'll try to rephrase the question.
Imagine the next task:
You've got a pointer to opened valid recordset. How to obtain an ailiases for all tables from source query? Not a 'source' or 'ActiveCommand.CommandText' from recordset but the aliases. Is it posible to achieve the goal.
P.S. I'm tryin' to realize following functioability:
An application reads the SQL-query (like "SELECT * FROM chain of tables..." or "SELECT tab1.*, tab2.Caption... FROM chain of tables). The application constructs a dialog that offer to any user to specify a complex filter. In any case the source query is unknown, until it had been read.
Is any smart decision exist? I can realize parsin' of a source query by I think it's not smart enough.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|