Sean,
Thank you.
And checking for the existence of a field or not is exactly what I am trying
to do. Simply put, how do I query the FieldSchema to see if a field exists
or not?
I know the code that I posted does not work. I am trying to query the
FieldSchema for whether a field exists or not, and I keep getting google
search results and answers elsewhere (including RealSoftware documentation)
that say, "query for whether the field exists" but does not say HOW to query
for existence.
Thank you.
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>