Enough with these simple, smart answers, RKC. You're making the rest
of us look bad. Well, you're making me look bad.
So you think that this simple one liner is better than all that crap I
posted, eh?
Debug.Print CurrentProject.Connection.Execute("SELECT [Name] FROM
Schools WHERE 1 =3D 2").Fields(0).DefinedSize
' shows 50
Hmmmm ... me too!
On May 11, 11:27=A0am, rkc <r...@[EMAIL PROTECTED]
> wrote:
> stevew wrote:
> > I'm using SQL within Visual Basic in conjunction with Access
> > databases. Say I am about to insert a record with a long string for a
> > particlar field. It would be useful to prevent errors to first
> > interrogate the DB to learn the maximum permissible length of that
> > field, and only then proceed to write the record. I believe I've seen
> > that done =A0 -- i.e., get Access field properties -- but don't know
the=
> > SQL syntax. Can anyone give me a sample?
>
> Open a recordset and examine the properties of the Field object in
> question. =A0Doesn't matter if it's an ADODB.Recordset or DAO.Recordset.
> Doesn't even matter if it's an empty recordset as long as the field in
> question is included in the query string.


|