Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > Re: Learning a ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 9 Topic 30222 of 31596
Post > Topic >>

Re: Learning a Field's Properties Using SQL

by lyle fairfield <lyle.fairfield@[EMAIL PROTECTED] > May 11, 2008 at 09:55 AM

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.
 




 9 Posts in Topic:
Learning a Field's Properties Using SQL
stevew <mktg@[EMAIL PR  2008-05-10 19:48:52 
Re: Learning a Field's Properties Using SQL
Tom van Stiphout <no.s  2008-05-10 20:02:46 
Re: Learning a Field's Properties Using SQL
stevew <mktg@[EMAIL PR  2008-05-11 07:16:40 
Re: Learning a Field's Properties Using SQL
lyle fairfield <lyle.f  2008-05-11 07:44:52 
Re: Learning a Field's Properties Using SQL
rkc <rkc@[EMAIL PROTEC  2008-05-11 11:27:41 
Re: Learning a Field's Properties Using SQL
lyle fairfield <lyle.f  2008-05-11 09:55:49 
Re: Learning a Field's Properties Using SQL
rkc <rkc@[EMAIL PROTEC  2008-05-11 14:06:37 
Re: Learning a Field's Properties Using SQL
"Larry Linson"   2008-05-11 21:56:19 
Re: Learning a Field's Properties Using SQL
stevew <mktg@[EMAIL PR  2008-05-11 12:53:13 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 11:29:54 CST 2008.