comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Finding a structure in a structure
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Finding a structure in a structure [message #28674] Mon, 07 January 2002 13:38 Go to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
I see two ways of handling this.
First, you can rectify this directly in Access when you are working with
the recordset (of which, rightfully, you said nothing in your post, as
it is not dealing with IDL).
In IDL - since you already havi the Recordset structure in it - I would
try the following:

for i = 0, n_tags(recordset)-1 do begin
; Convert date to Access format, to string, if field is a Structure
if size(recordset.(i), /type) eq 8 then $
Convert, recordset.(i) ; This is *your* conversion routine
; Ignore this field of Recordset if not a Structure
else ....
endfor

Personally, I can't imagine trying to mix IDL widgets with VBA and
Access' forms. The latter offer tremendously more flexibility with
regard to database analyses.
hope this helps,
Pavel

Tim Williams wrote:
>
> I have an application that is using Dataminer to access a database,
> one of the functions being to display the tables in the database. So
> far, my database has been Oracle on a Sun, where my IDL on a PC. I'm
> now migrating over some of the tables to Access on the PC. I now have
> a problem because one of my fields has a date in it which was a STRING
> before, but in the Access database is the structure
> ODBC_SQL_TIMESTAMP. I'm getting an error that structures can't contain
> other structures.
>
> My plan now is to write code to convert this structure to a string so
> I can put the date in the table widget structure.
>
> How? I can do a tag_names(recordset, /structure_name) and test for
> 'ODBC_SQL_TIMESTAMP', but I'm not sure how to search through each
> member in the database recordset structure. I don't know how to handle
> the errors I will have when I call tag_names() with the members that
> aren't structures.
>
> Thanks for any help.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Command line
Next Topic: Re: Null terminated strings

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 06:27:43 PDT 2025

Total time taken to generate the page: 8.64669 seconds