Updating data using VWD Express VB code


W

wildlifecanada

I'm fairly green to this web developer thing, especially when it come
to data access, so forgive my ignorance.

I've made a web page using Web Developer Express (2005). I've got it
hooked up to SQL Express 2005 by dropping SQLDataSource, GridView and
DetailsView components onto the page. So now I've got a webpage that
can display and modify data in my database and add and delete rows.
However this is all done with the components and I have not written
any code to do this (pretty cool, actually).

Now I'm ready for the next step, but I don't know how to do it.

Here's an example of what I would like to do.

I would like to have a drop down list that is populated from a field
in the database, for example name. (I know who to do this part). I
might have 2 or three of these drop downs so that I can choose more
than one name or the same name more than once.

Once all the drop downs are selected (or left blank), I would like to
be able to click a submit button, and then code will look at the names
in the drop down and add a value to a field in the same record with
that name.

So....in the drop downs, I have selected:

Smith
Jones
Johnson
Gordon
Stewart
Gordon

Each record has a 'Name' field and a 'Points' field which is an
integer. When I click submit, it will add 1 to the points field for
Smith, Jones, Johnson and Stewart, and will add 2 to the points field
for Gordon. Got all that?

What I don't know is what the code would be to do this and where to
put the code. Can it go in the apsx file or in a seperate file? I'm
assuming SQL code is required but what is it and where do I put it.

Any help would be required. Even if you can point me to a sample app
that does the same thing, that would be appreciated. The website I
created defaulted to VB when setting up, so I a VB solution would be
best.

Thanks
 

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

Similar Threads

Bug in VWD 2008 Express? 1
Using Dexplore in VB code 0
anchors in vwd 0
create a folder useing vb code? 4
vb express conversion 5
vb express question 2
Error in Vb express 6
this C# code in VB? 7

Top