Insert SQL Completion event with data grid
Last Post 06-09-2012 03:38 AM by Mark Harle. 2 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
Mark HarleUser is Offline
going with the flow
going with the flow
Posts:45
Avatar

--
06-08-2012 03:26 AM
    Hi - I have a couple questions about using the data grid control. I am running DNN v 6.1.3 and DF v 4.0.1.

    I an preparing a form in which I want to capture several fields of information (e.g., First name, last name and DOB) for up to about 6 individuals. The data grid is ideal for the front end, however, I am unable to get an Insert SQL completion event to work.

    Specifically I have been evaluating this using your Demo 24. When I run an Insert SQL completion event using all fields in the script, the SQL Insert fails (the email confirmation, however, delivers). When I remove the grid view fields from the Demo 24 Insert script ( i.e., [WorkExperience] and [Education]) the Insert works fine for the other fields.

    So I'm concluding there is an issue committing the data grid fields. Is this accurate? And can you suggest an alternative method to capture and commit the data summarized above?

    Thank you.

    Mark
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    06-08-2012 02:21 PM
    Hi Mark - If you enable DEBUG MODE on the form, when you click submit I believe it will record more specifics on what the actual error is... More then likely this is a truncation issue (did you use the wizard to create the table originally that you are storying?). I imagine that the column that is storing this data is probably limited to maybe 500 characters and you need to make this set to NVARCHAR(MAX) or at least higher then it is.

    You would have to run something like this under Host/SQL:

    ALTER TABLE YOURTABLENAME
    ALTER COLUMN YOURCOLUMNNAME nvarchar(MAX) null

    You might want to reference other examples here:
    http://sqlserverplanet.com/sql/alte...ter-column


    Thanks,

    Chad
    Mark HarleUser is Offline
    going with the flow
    going with the flow
    Posts:45
    Avatar

    --
    06-09-2012 03:38 AM
    Chad - that worked. I didn't realize that the Data Grid control was committing the HTML table tags (which makes sense once you think about it) and as a result the character count exceeded the max allowed for the field. Works beautifully now with the data grid fields as nvarchar(MAX).
    Thank you.
    Mark


    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi