Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Stuart Thomson 1 post 21 karma points
    Jul 06, 2011 @ 11:36
    Stuart Thomson
    0

    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

     

     

     

  • Michael Latouche 504 posts 819 karma points MVP 3x c-trib
    Jul 06, 2011 @ 12:05
    Michael Latouche
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft