GridView ASP.net VB Noob

J

Japskunk

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
 
J

Japskunk

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/coding4fu...=1066560&title=aggregating syndicated content

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top