PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → DB design to be use in webdev
DB design to be use in webdev
Débuté par PETER ZHOU, 21 fév. 2008 14:47 - 5 réponses
Posté le 21 février 2008 - 14:47
Hi,

Need help on a db design.

Users will import a EXCEL file ( first few columns is fixed - no change in date, field label & data type...last few columns is variable). How to cater for this kind of db design to work in webdev ?

The users needs the ability to define the fields that they need.

For example, the excel format can be :-

1) ID, NAME, CONTACT, PAY, DEPARTMENT, COST CENTRE, SKILL LEVEL

2) ID, NAME, CONTACT, ROOM NUMBER, DATE OF BIRTH, CABIN NUMBER

As you can see, the first 3 fields, data type & field label is fixed...last few fields, label & data type is different

Plese help !

Thanks...
Posté le 21 février 2008 - 15:17
Hi Peter...

Personally, in a case like that, I would store all the variables columns as 'items' inside ONE memo field. By example, if you have City, Phone, and Email as variable columns, I would create a text memo field containing:

CITY=Value of the city field for that record

PHONE=Phone Number

EMAIL=EMail address

Of course, you'll have to deal with the case of CR included in values.

The happy owners of my DVD courses will have recognized another possible usage of my clParam class :-)

Best regards

Fabrice

>Hi,

Need help on a db design.


>Users will import a EXCEL file ( first few columns is fixed - no change in date, field label & data type...last few columns is variable). How to cater for this kind of db design to work in webdev ?

The users needs the ability to define the fields that they need.


>For example, the excel format can be :-

1) ID, NAME, CONTACT, PAY, DEPARTMENT, COST CENTRE, SKILL LEVEL


>2) ID, NAME, CONTACT, ROOM NUMBER, DATE OF BIRTH, CABIN NUMBER

As you can see, the first 3 fields, data type & field label is fixed...last few fields, label & data type is different


>Plese help !

Thanks...
Posté le 22 février 2008 - 09:43
Hi Fabrice,

Thank you for your reply.

But how do you display them & allow the user to edit from the MEMO field just like individual field with the relevant entry checks/mask input ( in the case of CITY, PHONE & EMAIL - 3 fields ) ? if i allow the enduser to edit from the MEMO field, then there's no checks or lookups.



>Hi Peter...

Personally, in a case like that, I would store all the variables columns as 'items' inside ONE memo field. By example, if you have City, Phone, and Email as variable columns, I would create a text memo field containing:


>CITY=Value of the city field for that record

PHONE=Phone Number


>EMAIL=EMail address

Of course, you'll have to deal with the case of CR included in values.


>The happy owners of my DVD courses will have recognized another possible usage of my clParam class :-)

Best regards


>Fabrice

Hi,


>>Need help on a db design.

Users will import a EXCEL file ( first few columns is fixed - no change in date, field label & data type...last few columns is variable). How to cater for this kind of db design to work in webdev ?


>>The users needs the ability to define the fields that they need.

For example, the excel format can be :-


>>1) ID, NAME, CONTACT, PAY, DEPARTMENT, COST CENTRE, SKILL LEVEL

2) ID, NAME, CONTACT, ROOM NUMBER, DATE OF BIRTH, CABIN NUMBER


>>As you can see, the first 3 fields, data type & field label is fixed...last few fields, label & data type is different

Plese help !


>>Thanks...
Posté le 22 février 2008 - 11:32
Hi Peter...

Now that's another can of worm, and you will find the answer if you search on this forum with the keyword CLONE.... You should even find a link to an example project to help you start in the right direction

Best regards

Fabrice

>Hi Fabrice,

Thank you for your reply.


>But how do you display them & allow the user to edit from the MEMO field just like individual field with the relevant entry checks/mask input ( in the case of CITY, PHONE & EMAIL - 3 fields ) ? if i allow the enduser to edit from the MEMO field, then there's no checks or lookups.

Hi Peter...


>>Personally, in a case like that, I would store all the variables columns as 'items' inside ONE memo field. By example, if you have City, Phone, and Email as variable columns, I would create a text memo field containing:

CITY=Value of the city field for that record


>>PHONE=Phone Number

EMAIL=EMail address


>>Of course, you'll have to deal with the case of CR included in values.

The happy owners of my DVD courses will have recognized another possible usage of my clParam class :-)


>>Best regards

Fabrice


>>>Hi,

Need help on a db design.


>>>Users will import a EXCEL file ( first few columns is fixed - no change in date, field label & data type...last few columns is variable). How to cater for this kind of db design to work in webdev ?

The users needs the ability to define the fields that they need.


>>>For example, the excel format can be :-

1) ID, NAME, CONTACT, PAY, DEPARTMENT, COST CENTRE, SKILL LEVEL


>>>2) ID, NAME, CONTACT, ROOM NUMBER, DATE OF BIRTH, CABIN NUMBER

As you can see, the first 3 fields, data type & field label is fixed...last few fields, label & data type is different


>>>Plese help !

Thanks...
Posté le 24 février 2008 - 09:18
Hi Fabrice,

>www.windevtutorials.com/downloads/MoveControlApp.zip

Is this the windev project ? I'm having errors with this project...

Are you referring to CONTROLCLONE functions ?

Hi Peter...


>Now that's another can of worm, and you will find the answer if you search on this forum with the keyword CLONE.... You should even find a link to an example project to help you start in the right direction

Best regards


>Fabrice

Hi Fabrice,


>>Thank you for your reply.

But how do you display them & allow the user to edit from the MEMO field just like individual field with the relevant entry checks/mask input ( in the case of CITY, PHONE & EMAIL - 3 fields ) ? if i allow the enduser to edit from the MEMO field, then there's no checks or lookups.


>>>Hi Peter...

Personally, in a case like that, I would store all the variables columns as 'items' inside ONE memo field. By example, if you have City, Phone, and Email as variable columns, I would create a text memo field containing:


>>>CITY=Value of the city field for that record

PHONE=Phone Number


>>>EMAIL=EMail address

Of course, you'll have to deal with the case of CR included in values.


>>>The happy owners of my DVD courses will have recognized another possible usage of my clParam class :-)

Best regards


>>>Fabrice

Hi,


>>>>Need help on a db design.

Users will import a EXCEL file ( first few columns is fixed - no change in date, field label & data type...last few columns is variable). How to cater for this kind of db design to work in webdev ?


>>>>The users needs the ability to define the fields that they need.

For example, the excel format can be :-


>>>>1) ID, NAME, CONTACT, PAY, DEPARTMENT, COST CENTRE, SKILL LEVEL

2) ID, NAME, CONTACT, ROOM NUMBER, DATE OF BIRTH, CABIN NUMBER


>>>>As you can see, the first 3 fields, data type & field label is fixed...last few fields, label & data type is different

Plese help !


>>>>Thanks...
Posté le 24 février 2008 - 20:40
Hi Peter...

that's certaily the thread I was talking about...

Of course, ControlClone is a windev only instruction, and if I'm not mistaken, we were talking in this thread about the different methods to use in webdev

Best regards

Fabrice

>Hi Fabrice,



>Is this the windev project ? I'm having errors with this project...

Are you referring to CONTROLCLONE functions ?


>>Hi Peter...

Now that's another can of worm, and you will find the answer if you search on this forum with the keyword CLONE.... You should even find a link to an example project to help you start in the right direction


>>Best regards

Fabrice


>>>Hi Fabrice,

Thank you for your reply.


>>>But how do you display them & allow the user to edit from the MEMO field just like individual field with the relevant entry checks/mask input ( in the case of CITY, PHONE & EMAIL - 3 fields ) ? if i allow the enduser to edit from the MEMO field, then there's no checks or lookups.

Hi Peter...


>>>>Personally, in a case like that, I would store all the variables columns as 'items' inside ONE memo field. By example, if you have City, Phone, and Email as variable columns, I would create a text memo field containing:

CITY=Value of the city field for that record


>>>>PHONE=Phone Number

EMAIL=EMail address


>>>>Of course, you'll have to deal with the case of CR included in values.

The happy owners of my DVD courses will have recognized another possible usage of my clParam class :-)


>>>>Best regards

Fabrice


>>>>>Hi,

Need help on a db design.


>>>>>Users will import a EXCEL file ( first few columns is fixed - no change in date, field label & data type...last few columns is variable). How to cater for this kind of db design to work in webdev ?

The users needs the ability to define the fields that they need.


>>>>>For example, the excel format can be :-

1) ID, NAME, CONTACT, PAY, DEPARTMENT, COST CENTRE, SKILL LEVEL


>>>>>2) ID, NAME, CONTACT, ROOM NUMBER, DATE OF BIRTH, CABIN NUMBER

As you can see, the first 3 fields, data type & field label is fixed...last few fields, label & data type is different


>>>>>Plese help !

Thanks...