Sqldatasource Update

  • Thread starter Thread starter Mike J.
  • Start date Start date
M

Mike J.

Hi,
I'm having trouble updating an Oracle database table using SqlDataSource and
a Gridview when I include a date field. It works fine without the date
field, but when I put the date field in, I get errors.
What is the syntax and/or method to update a date field? How is the date
formatted from the Gridview's textbox to the UpdateComand of the
SqlDataSource?

<asp:SqlDataSource ID="EditGrid" runat="server"
ConflictDetection="ComareAllValues" ConnectionString="<%$ ... %>"
UpdateCommand='Update EditTable set active_flag = :ACTIVE_FLAG, edit_dt
= to_date(":EDIT_DT", "MM/DD/YYYY HH:MI:SS PM") where edit_id =
:original_EDIT_ID and active_flag = :original_active_flag and edit_dt =
:original_EDIT_DT'>
<UpdateParameters>
<asp:Parameter Name="ACTIVE_FLAG" Type="String" />
<asp:Parameter Name="EDIT_DT" Type="DateTime" />
<asp:Parameter Name="original_ACTIVE_FLAG" Type="String" />
<asp:parameter Name="original_EDIT_DT" Type="DateTime" />
</UpdateParameters>
</asp:SqlDataSource>
 
Mike,

Try your question in the newsgroup

Microsoft.public.dotNet.framework.AdoNet

There are guys active with experience in development with Oracle

Cor
 
Back
Top