Results 1 to 2 of 2

Thread: commandField in detailView control

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2007
    Location
    Eindhoven
    Posts
    828

    commandField in detailView control

    Hey,

    in the website I'm developing, I use a detailView control to view my records. I vreate a custom button to behave as the default Edit/new button of the control for transaction need during the insert or update operation.

    When I press on my button, I get an error message saying that:
    'Cannot insert null in the column columnName' . However, when I use the default I got no error messag.

    I think that the problem is with the parameter collection of the insertCommand or updatecommand but I don't know how to fix the problem.

    my code looks like this

    vb Code:
    1. open connection
    2. begin transaction
    3. try
    4.     new Logcommand
    5.     detailView1.Insert
    6.     logcommand.execute non query
    7.     commit transacation
    8. catch
    9.     echo error
    10.     rollback transaction
    11. finally
    12.     close connection
    13. end try

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: commandField in detailView control

    If that's your actual code, how on earth did you get it to compile?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width