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

"Hidden" Field Question

Status
Not open for further replies.

IForgot

Programmer
Mar 20, 2002
122
US
I have a VFP7 application which uses Remote Views (a utilization of ODBC) 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 Informix 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 "native" system 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.

I am hoping that one of you Informix gurus can explain what is going on to prevent my ODBC connection from even "seeing" the field and returning a value.

Thanks,
I_Forgot
 
Hi,

As you rightly identified, the field rowid is hidden from the normal select statement results. Since it is not an user-defined field, meant mostly for the database servers internal usage, it is hidden from the general outputs. Further, the rowid concept is available in a non-fragmented tables by default, and should you require them in a fragmented table, it has to be created with specific SQL keyword.

However, if you need the rowids in your application, you need to specify this in the select statement as:

SELECT rowid, * from table_name where ....

It is to be noted that in all the informix documentations, is is been suggested not to rely heavily on rowids and users should always base their manipulations on primary key/s.

Regards,
Shriyan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top