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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieval of Remote Table "Hidden" Field

Status
Not open for further replies.

IForgot

Programmer
Mar 20, 2002
122
0
0
US
I have a VFP7 application which uses Remote Views to access data within a Informix database running on a Linux box. For the most part the Remote Views work well.

However there are a few tables which have a field (rowid) in it which is "hidden". While all the other fields show up, this "hidden" field will not appear within the Remote View designer.

Within the Linux box if you perform a "normal" SQL query such as:
SELECT * FROM MyTable
on one of these tables, its results will also not display this "hidden" field (rowid).

But if you specifically include the field within the query such as:
SELECT rowid FROM MyTable
or
SELECT * FROM MyTable WHERE rowid = 10
the field (rowid) and its contents will appear as part of the query results.

Since the VFP View Designer does not "see" the field RowID, I cannot add it to its query string.

I will go to the Informix forum to see if I can learn more about the attributes of a "hidden" field. Maybe they just aren't supported through an ODBC connection, but, if so, that does would not explain the SQL query results within its "native" system.

Any suggestions on how to use VFP get a remote data query to work which will retrieve this "hidden" field?

Thanks,
I_Forgot
 
The same thing happens when IMPORTing Excel files. I manually 'unhide' them at the moment... not that this helps you. Any reason why you can't enumerate the hidden field(s) using SELECT *,TheHiddenField from MyTable?

Brian
 
I cannot enumerate the hidden field(s) in the SQL string within the Remote View Designer because despite having successfully "exposed" the table during the New Remote View... process, it cannot "see" the hidden field.

Manually typing the hidden field name into the "Functions and Expressions" window of the Fields tab page and doing an ADD merely adds a string Constant field whose value is "RowID" instead of adding the field to the query.

I also though about using the * (entered through the "Functions and Expressions window) in the SQL statement along with a qualifying WHERE RowID > 0, but:
1. The * did not work in the Fields property of the Remote View Designer.
2. The RowID field was not shown in the Filter tab page choices to be used.
When I did a View SQL things looked good. But the View would not Save and displayed an error message.

Thanks,
I_Forgot
 
Just a follow-up...

I quit attempting to make this happen with the Remote View Designer - New Remote View

Instead I ended up building a CREATE VIEW programatically and including the "hidden" field. By doing so I avoided any limitations which might have been occuring as a result of using the Wizard.

Anyway, by manually creating the View it is now returning the "hidden" field values.

Thanks,
I_Forgot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top