Sean,
Looking further into your earlier post. .... so FieldSchema returns the
attributes of a single field? And tableschema returns a list of all tables?
How do we test if one or multiple fields exists within a table or not? In
the snippet below "Note" is a table, not a field.
Regards,
Kirt
2006/2/18, Sean Arney <[EMAIL PROTECTED]>:
>
> > Dim rs As New RecordSet
> > rs = db.FieldSchema("Note")
>
> Here you should be getting the rset with details about the field.
> >From LR:
> FieldSchema returns a RecordSet with five fields: ColumnName ( String),
> FieldType ( Integer), IsPrimary ( Boolean), NotNull ( Boolean), and Length
> in bytes ( Integer) for Text fields.
>
>
> > If rs.Field("clearNote") = Nil
> > db.SQLExecute("ALTER TABLE Note ADD COLUMN clearNote VarChar")
> > End If
> > If rs.Field("reviewNote") = Nil Then
> > db.SQLExecute("ALTER TABLE Note ADD COLUMN reviewNote VarChar")
> > End If
>
> So asking for db.field(fieldname) isnt going to get what you want, your
> first call to FieldSchema will give you the 'setup' of the field. To
> check
> if theres a value in there that is null or not, I think you'll need to
> query
> the record and check the content not the field properties. If you query
> FieldSchema on some field name, all you know or can know is whether or not
> the field exists - which appears to be what you're after there. I think
> you
> just need to check that the rset is <> Nil.
>
> Also, if you query the tableschema, you should get back a string of table
> names.
>
> HTH,
>
> -seanA
>
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>
>
--
Kirt Cathey
WorkPapers Development
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>