PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Upload users in WB
Upload users in WB
Iniciado por guest, 12,ene. 2015 00:51 - 3 respuestas
Publicado el 12,enero 2015 - 00:51
Hi All.. I am in the midst of the tutorials with WB and before I dive headlong into this cool app I need to know if its possible to create a page when an Admin can upload a list of users// with PW,logins and emails into the database... with the proper securtiy level.
I will be using WB to make components for schools and they will need to be able to upload accounts for their teachers.. not make them one at a time using a form.
Is possible?
I dont see any reference to this possibility it in the documents.
Publicado el 12,enero 2015 - 09:47
Hi Carsten,

This needs some programming.
Let them upload an Excel file with the accounts.
Read the Excel file using the xls functions and add the accounts to the database.
Regards,
Piet
Publicado el 12,enero 2015 - 18:46
Thanks Piet!
Would I be using HAdd?
Publicado el 13,enero 2015 - 14:49
Hi Carsten,

Of course.
You need an upload control.
In the processing code of the upload control you store the Excel file in a temporary location.
Then you open (see: xlsDocument ) it and read the cells row by row, assign the cells to the file buffer and add them to a database file using hAdd.
After that you can delete the Excel file.
For security reasons and more convenient for the schools it might be best to not include the passwords in the Excel. (People don't like to share their passwords and it's a lot of work for the users to create passwords.
Instead generate random passwords, store them in the database and email them to the users using the supplied email addresses.
You could set a flag in the database to force the user to change password on first login.

I know, easier said than done, each of these require a more than basic programming experience.

Regards,
Piet