Home All Groups Group Topic Archive Search About

help me with an algorithm please

Author
16 Jan 2006 12:14 PM
samuelberthelot@googlemail.com
Hi,
I can't figure out how to build a string based on the requirements
described below:

First here are my SQL tables:

Fields (FieldId, FieldName)
ConstraintMessage (Id, FieldId, FieldPosition, Message)

Basically, the user can build a ConstraintMessage by dragndropping
FieldNames from a listbox to a textbox. The textbox can also be edited
in order to make the ConstraintMessage more complex.

As you can see, only the FieldId of the dragndropped fields are stored
in [ConstraintMessage] as well as its position in the message.
'Message' is used to store the text entered directely in the textbox.

When a ConstraintMessage is built in order to be displayed on the
screen, it's a matter of inserting the right 'FieldName' at the right
'MessagePosition' in 'Message'.

The difficult thing is that, when you restore the ConstraintMessage, a
Field might have been deleted from Fields or a FieldName might have
change since the day the ConstraintMessage was built.

I hope it's clear enough.  How to do that in Vb.net ?

Thank you.

Author
17 Feb 2006 12:38 AM
Homer J Simpson
<samuelberthe***@googlemail.com> wrote in message
news:1137413658.799321.223440@g14g2000cwa.googlegroups.com...

> Hi,
> I can't figure out how to build a string based on the requirements
> described below:
....
> I hope it's clear enough.  How to do that in Vb.net ?

A couple of examples would help.