Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Sqldatasource Update

Reply
 
Old 04-27-2009   #1 (permalink)
Mike J.


 
 

Sqldatasource Update

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 =
riginal_EDIT_ID and active_flag = riginal_active_flag and edit_dt =
riginal_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" />
<asparameter Name="original_EDIT_DT" Type="DateTime" />
</UpdateParameters>
</asp:SqlDataSource>

My System SpecsSystem Spec
Old 04-28-2009   #2 (permalink)
Cor Ligthert[MVP]


 
 

Re: Sqldatasource Update

Mike,

Try your question in the newsgroup

Microsoft.public.dotNet.framework.AdoNet

There are guys active with experience in development with Oracle

Cor
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
VB.NET: dynamically change SqlDataSource SelectCommand and re-exec .NET General
How to reset the SelectCommand of a SqlDataSource on the client(JavaScript)? .NET General
GridView not Updating Through SqlDataSource .NET General
newbie question on SqlDataSource object .NET General
Windows update error 80070103 - Beta 2 Vista NVIDIA Driver Update Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46