Error importing Members Programmatically using SQL
Hi,
I have been given a large umbraco site and have been asked to fix a bug when new Members are imported by the client.
Members from a seperate system are imported via Excel - this is the process that has started failing recently. On inspection I discovered that the code programmatically generates four INSERT sql statements to add a new member to the umbraco database. This code has been pulled from the 'Umbraco Source' which i beleive bypasses the API, and is not recommended by Umbraco.
When I was debugging the import process today I found that the results were inconsistant. Around ten tests failed and one test passed without any changes to code or database data.The code errors adding property types to the Member object which is being imported.
My questions:
- Is this inconsistant error caused a side-effect of bypassing the API and inserting members directly in the database?
- Is the member class 'thread safe'?
- Should Members only ever be imported via API calls (with no execeptions?)
Error importing Members Programmatically using SQL
Hi,
I have been given a large umbraco site and have been asked to fix a bug when new Members are imported by the client.
Members from a seperate system are imported via Excel - this is the process that has started failing recently. On inspection I discovered that the code programmatically generates four INSERT sql statements to add a new member to the umbraco database. This code has been pulled from the 'Umbraco Source' which i beleive bypasses the API, and is not recommended by Umbraco.
When I was debugging the import process today I found that the results were inconsistant. Around ten tests failed and one test passed without any changes to code or database data.The code errors adding property types to the Member object which is being imported.
My questions:
- Is this inconsistant error caused a side-effect of bypassing the API and inserting members directly in the database?
- Is the member class 'thread safe'?
- Should Members only ever be imported via API calls (with no execeptions?)
Thanks for your time
Hi Stuart,
Maybe you could consider using a package like cmsImport, which allows you to import members from Excel into Umbraco? More info here: http://our.umbraco.org/projects/developer-tools/cmsimport
Hope this helps.
Cheers,
Michael
is working on a reply...