473,405 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

I'll try again...

Why does this not work? Anyone, please...

According to the Visual Studio (2005) documentation this should work
but, while it does not report any errors, it does not update the
database, either.

So, please, anyone, why does this not work?

tia,

rts

<asp:SqlDataSource ID="project_source" runat="server"
OldValuesParameterFormatString='old_{0}'
ConnectionString="<%$ ConnectionStrings:Access Database Test
Connection %>"
ProviderName="<%$ ConnectionStrings:Access Database Test
Connection.ProviderName %>"
UpdateCommand="Update projects set name=@name where
projectid=@old_projectid"
SelectCommand="Select projects.projectid, projects.name from
projects">
<UpdateParameters>
<asp:Parameter Name="projectid" Type="Int32" />
<asp:Parameter Name="name" Type="String" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:FormView ID="project_formview" runat="server"
DataSourceID="project_source">
<EditItemTemplate>
<asp:HiddenField ID='projectid' runat='server' Value='<%# Bind
("projectid") %>' />
<asp:TextBox ID='name' runat='server' Text='<%# Bind ("name") %>'

MaxLength=255 Width=500 />
<asp:Button ID="update" runat="server" Text="Update Record"
CommandName="Update" />
</EditItemTemplate>
<ItemTemplate>
<asp:Button ID='update_mode' runat='server' Text='Update Mode'
CommandName='Edit' />
</ItemTemplate>
</asp:FormView>

Nov 7 '06 #1
1 950
Does it show the data? If it doesn't update/insert data, I would look at
permissions. Keep in mind that any file-based database, such as MS Access,
requires write permissions on the database for the ASP.Net user account. I
usually add delete permissions just in case.

--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"Rex the Strange" <ro********@widgetinc.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
Why does this not work? Anyone, please...

According to the Visual Studio (2005) documentation this should work
but, while it does not report any errors, it does not update the
database, either.

So, please, anyone, why does this not work?

tia,

rts

<asp:SqlDataSource ID="project_source" runat="server"
OldValuesParameterFormatString='old_{0}'
ConnectionString="<%$ ConnectionStrings:Access Database Test
Connection %>"
ProviderName="<%$ ConnectionStrings:Access Database Test
Connection.ProviderName %>"
UpdateCommand="Update projects set name=@name where
projectid=@old_projectid"
SelectCommand="Select projects.projectid, projects.name from
projects">
<UpdateParameters>
<asp:Parameter Name="projectid" Type="Int32" />
<asp:Parameter Name="name" Type="String" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:FormView ID="project_formview" runat="server"
DataSourceID="project_source">
<EditItemTemplate>
<asp:HiddenField ID='projectid' runat='server' Value='<%# Bind
("projectid") %>' />
<asp:TextBox ID='name' runat='server' Text='<%# Bind ("name") %>'

MaxLength=255 Width=500 />
<asp:Button ID="update" runat="server" Text="Update Record"
CommandName="Update" />
</EditItemTemplate>
<ItemTemplate>
<asp:Button ID='update_mode' runat='server' Text='Update Mode'
CommandName='Edit' />
</ItemTemplate>
</asp:FormView>

Nov 7 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gary DeRousse | last post by:
This pertains to SQL Server 2000 Do others have the problems that we have in our company, where we have a field from a table, and need to know all the SQL Server processes that may change that...
53
by: Bill | last post by:
Hello Programmers, I am looking for either Java Script (OR HTML etc) to DEFEAT Pop-up Stoppers e.g It will bring up a window that will LOOK like a Pop-up FEEL like a Pop-up Allow a name and...
5
by: _R | last post by:
I need to establish a canvas for sorts, for painting primarily single line pictures. Lines and images are currently drawn into raw graphics space which is derived from a control, using LockBits. ...
5
by: _R | last post by:
I need to establish a canvas for sorts, for painting primarily single line pictures. Lines and images are currently drawn into raw graphics space which is derived from a control, using LockBits. ...
12
by: Christian Blackburn | last post by:
Hi Gang, I would like to open a compressed document of mine. The problem is part of the compression algorithm contains character 0 which I need to detect. VB sees character 0 as "" nothing and I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.