Please help!!!!

Discussion in 'ASP.NET / ASP.NET Core' started by Mahdi837, Aug 13, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi All,


    I need an urgent help....
    For god sake, can someone tell me what is wrong with the following function???

    1. The Insert Statement was tested successfully with oracle and with the .NET Wizard.... But whenever I click the Button4 from the application nothing happens... what is wrong with this InsertCommand???

    Please help... what I am missing here!!!![​IMG]

    Protected Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click



    Label1.Text = "hello world"


    uatSupportSource4x.InsertCommand = "INSERT INTO SUPPORT(TESTER_NAME, ACTIVITY, PROBLEM, SOLUTION, RELATED_EXCEPTION, PROB_DATE) VALUES ('Karkar', 'Wahbi', 'Hiba', 'Omima', 'Adham', TO_DATE('05/08/2007 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'))"


    Thanks in Advance for saving my Job,
     
  2. Bruce

    Bruce DiscountASP.NET Staff

  3. Assuming uatSupportSource4x is SqlDataAdapter ,try something like:

    Dim insertquery As string='INSERT INTO SUPPORT(TESTER_NAME, ACTIVITY, PROBLEM, SOLUTION, RELATED_EXCEPTION, PROB_DATE) VALUES ('Karkar', 'Wahbi', 'Hiba', 'Omima', 'Adham', TO_DATE('05/08/2007 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'))'

    uatSupportSource4x.InsertCommand = New SqlCommand('insertquery',yourconnection) where 'yourconnection' is your connection string.

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  4. uatSupportSource4x is the sqldatasource.

    Regards,
    Mahdi
     
  5. You need to call the insert method in your code. something like:

    uatSupportSource4x.InsertCommand='...' will only assign the value to the InserCommand property.Use the above method to invoke the InsertCommand.
    uatSupportSource4x.Insert();

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  6. Vikra....





    I have to say that you are great [​IMG] [​IMG] [​IMG] [​IMG] [​IMG]


    Thanks you.... It worked
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page