Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 29th, 2006, 01:43 PM
Friend of Wrox
 
Join Date: Apr 2004
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can you access the data in a SQLDataSource

Hi,

I want to know if you can programetically access and change the data in a SQLDataSource object. I have a gridview which uses a SQLDataSource object as its back end. It automatically implements editing, inserting, deleting, sorting and paging. I love it.

Now I've got a button control in each row of the GridView that will require a custom event handler and I'll need to edit the actual dataRow behind the GridViewRow in that handler, and don't see any methods of the SQLDataSource object that return DataRows. Is this not possible? Do I need to create a separate dataset for this?

If you want more information, here it is. This is a CMS for an Image Gallery. The owner of the site would like to be able to re-order the images in her gallery. I created an OrderOfAppearance field in the SQL Server table, and I thought about just using text boxes, where the user can enter in integers to re-order the way the pictures appear, but then I thought how much cooler it would be if there were a Move Up and Move Down button in every row. But to do that I need access to the backend data store. Rather than sending individual UPDATE queries to the database, then refreshing the SQLDataSource object, I'd like to just change the SQLDataSource directly. Is that possible?

Thanks,

Aaron






Similar Threads
Thread Thread Starter Forum Replies Last Post
Access database fields with SQLDataSource hastikeyvan ASP.NET 3.5 Basics 0 April 21st, 2008 01:10 AM
Please Help! Ms Access Data Access Pages Iashia06 Access 0 May 4th, 2006 03:29 PM
SQL Access/ASP.NET data access issue saeta57 SQL Server ASP 1 July 4th, 2004 04:29 PM
SQL Access/ASP.NET data access issue saeta57 Classic ASP Databases 1 July 4th, 2004 03:32 PM
Data access page access problem :) kev_79 Access 0 September 4th, 2003 04:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.