Użytkownik Ed Leafe napisał:
> On Sep 3, 2012, at 3:59 AM, Jacek Kałucki wrote:
> So if I understand correctly, the problem that you're having is that an
> existing database field is being modified by someone other than the
> application author,
> and as a result the application can lose data? In my experience I've seen
> table columns modified
to be wider, but never reduced in size in an established database.
I must gather data from many sale points, unfortunately many of them uses
different
application/database version, where some field properties differ. Since I'm
even not an author of
that creation (it's really bad piece of software, believe me), I can't force
people to use same version.
Because I sometimes have to correct some data too and I really hate native
application, I decided to
write small interface in Dabo to bypass it.
>
> If a column were to be changed from, say, varchar(100) to a full text
> field, would the control change from a textbox to an edit control?
>
> If the column were to be removed from the database entirely, would that mean
> that the control would not be created?
>
> I guess I'm not clear on what exactly the problem is, and what you're
> proposing as a solution.
No, I don want to change control class, nor add or remove controls dynamically,
it's not that case.
What I want is to put in my MyCustomTextBox.aftrInit() method code like:
<code>
biz = self.Form.getBizobj(self.DataSource)
for desc in biz.DataStructure:
if desc[0] == self.DataField and desc[1] == "C":
self.TextLength = desc[5]
break
</code>
What I must to have is the data layer must return field size limit.
In fact, that information is already present in getStructureDescription()
method, it just isn't
returned to caller.
So my question is, did it harm anything if scale field will return display size
for character fields
too, instead of numeric only?
BTW, I already did it and it works ;)
--
Regards
Jacek Kałucki
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]