Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 3 Jahren, 1 Monat
Letzter Beitrag:
vor 3 Jahren, 1 Monat
Beteiligte Autoren:
Piet van Zanten, Carsten Kroon

Upload users in WB

Startbeitrag von Carsten Kroon am 11.01.2015 23: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.

Antworten:

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

von Piet van Zanten - am 12.01.2015 08:47
Thanks Piet!
Would I be using HAdd?

von Carsten Kroon - am 12.01.2015 17:46
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

von Piet van Zanten - am 13.01.2015 13:49
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.