473,325 Members | 2,792 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,325 software developers and data experts.

GridView ASP.net VB Noob

I am having trouble updating a SQL table through the GridView "Auto"
Enable Edit Feature...
I am connecting to a SQL 2000 Server with a SQLDataSource
I have created the Update Query in the Command and Parameter Editor
setup when I created my SQLadapter, along with Select and Delete.

Here is the Update Command:

UPDATE TBLUPSData SET UPSModel = @original_UPSModel, UPSLocation =
@original_UPSLocation, UPSDeviceAttached = @original_UPSDeviceAttached
WHERE UPSID = @original_UPSID

I also have each 4 parameters associated to the
GridView1.selectedvalue control

When I click on the Query Builder in the Command and Parameter
Editor, I can execute the query and actually update the tables, When
I try editing the GridView1 table in run mode, all the values that I
change after clicking the edit link and pressing the update link (on
the GridView table), nothing changes in my table?

I have also done the exact same for the delete command and it doesn't
work in GridView while in run mode but will in the query builder.
What am I missing here?

I am a noob to Visual Studios 2003/2005 data binding, are there any
good tutorials that move past the Select statement and actually help
with updating or inserting data based on user input? Cause I cant seem
to find anything good.

Thanks

Feb 8 '07 #1
1 1946
On Feb 8, 12:06 pm, "Japsk...@gmail.com" <Japsk...@gmail.comwrote:
I am having trouble updating a SQL table through the GridView "Auto"
Enable Edit Feature...
I am connecting to a SQL 2000 Server with a SQLDataSource
I have created the Update Query in the Command and Parameter Editor
setup when I created my SQLadapter, along with Select and Delete.

Here is the Update Command:

UPDATE TBLUPSData SET UPSModel = @original_UPSModel, UPSLocation =
@original_UPSLocation, UPSDeviceAttached = @original_UPSDeviceAttached
WHERE UPSID = @original_UPSID

I also have each 4 parameters associated to the
GridView1.selectedvalue control

When I click on the Query Builder in the Command and Parameter
Editor, I can execute the query and actually update the tables, When
I try editing the GridView1 table in run mode, all the values that I
change after clicking the edit link and pressing the update link (on
the GridView table), nothing changes in my table?

I have also done the exact same for the delete command and it doesn't
work in GridView while in run mode but will in the query builder.
What am I missing here?

I am a noob to Visual Studios 2003/2005 data binding, are there any
good tutorials that move past the Select statement and actually help
with updating or inserting data based on user input? Cause I cant seem
to find anything good.

Thanks

I used this tutorial from MSDN and the pictures seems wrong or I dont
understand...

http://msdn.microsoft.com/coding4fun...ated%20content

in the pictures the editors controls are that of the columns and the
parameters include the @original_*Var Name*
he says that the SQLDataSource control has another property titled
OldValuesParameterFormatString that specifies how an input parameter
out to appear in a query. the default property is original_{0}...
so I changed my Update query to the column names and it works instead
of useing the default property value this dude speaks of.
confused on why it wouldnt work based on this tutorial but it works
now so i am almost satisfied...

-J

Feb 8 '07 #2

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

Similar topics

3
by: theKirk | last post by:
using Visual Studio 2005 C# ASP.NET I know there has to be a simple way to do this....I want to use C# in a code behind for aspx. Populate a GridView from an xml file Add Fields to the...
6
by: Nalaka | last post by:
Hi, I have a gridView (grid1), which as a templateColumn. In the template column, I have put in a gridView (grid2) and a ObjectDataSource (objectDataSource2). Question is... How to I pass the...
3
by: NateDawg | last post by:
I'm reposting this. I'm kinda in a bind untill i get this figured out, so if anyone has some input it would sure help me out. Ok, I’ve noticed a few gridview problems floating around the forum....
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
5
by: Dick | last post by:
I have a GridView bound to an ObjectDataSource. I have a Button that calls GridView.DataBind. I want the row that is selected before the DataBind to still be selected afterwards. This happens...
2
by: antonyliu2002 | last post by:
I've been googling for some time, and could not find the solution to this problem. I am testing the paging feature of gridview. I have a very simple web form on which the user can select a few...
3
by: gianfranco dalfiume | last post by:
Hi all, i'm new to this newsgroup. This is my problem: i have a form with a GridView. The first column of the grid is a ButtoFields (image type) column, with some code to manage the request for...
6
by: RobertTheProgrammer | last post by:
Hi folks, Here's a weird problem... I have a nested GridView setup (i.e. a GridView within a GridView), and within the nested GridView I have a DropDownList item which has the...
3
by: Peter | last post by:
I have a GridView which is populated by List<ofObjects> Does anyone have example of how to sort the columns of this GridView? I have found examples without DataSourceControl but these use...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.