Results 1 to 5 of 5

Thread: Data not loading into database when I do FieldValidation

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2004
    Location
    in the heart of the Mediterranean
    Posts
    1,143

    Data not loading into database when I do FieldValidation

    Hi,

    Does anyne have any idea why my data wont load into database without any error when I include the objects from the Toolbox (RegularFieldValidations & CompareValidations).

    The data was loading fine until I added them.

    thanks

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Data not loading into database when I do FieldValidation

    How are you loading your data, and how did you fit those two objects into the process?

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2004
    Location
    in the heart of the Mediterranean
    Posts
    1,143

    Re: Data not loading into database when I do FieldValidation

    Well Hack,


    I found why the data is not going into the database but I dont know why. When I as for ISPostback and page.Isvalid no data is loaded.

    :
    Is it essential to ask for Postback or not.?? This is part of my submit button. To put it all clear Im asking for IsPostback also on Page load..

    Can u please explain to me if you know the meaning of the qouted lines

    VB Code:
    1. 'Try
    2.         '    If Not (IsPostBack) And Page.IsValid Then
    3.                 myCommand.Connection.Open()
    4.                 myCommand.ExecuteNonQuery()
    5.  
    6.                 MyConn.Close()
    7.                 MyConn = Nothing
    8.         '    End If
    9.         'Catch er As Exception
    10.         '    lblMessage.Text = er.Message.ToString
    11.         'End Try

    Thanks

  4. #4
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497

    Re: Data not loading into database when I do FieldValidation

    Not (IsPostBack) And Page.IsValid

    Makes the code within execute ONLY the first time the page is loaded.
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2004
    Location
    in the heart of the Mediterranean
    Posts
    1,143

    Re: Data not loading into database when I do FieldValidation

    ok, Lord Rat it works fine now thanks.

    do you know anything about email sending on the thread Ive jsut posted above. thanks

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