hai friends i am developing a voting software, but i cant able to find the code for increment the no:of vote in the database when an user click on the button.I used sql server 2005 as my back end..Any one pls help me...

Would you like to increment the record number or just a number?

i.e. record 1
record 2
record 3 etc...

OR

1
2
3
4 etc...

i jst want to record the no f vote in database as 1,2,3,....ie;when click the button record as 1 in database.again when we click on that button the numbr is incresed by one and recorded as 2.

Try the following

'Your recordset select statement here...

Dim x As Integer = rs.Recordcount + 1

'If it is a certain field, then
Dim x As Integer = rs!MyFieldname + 1

is it the actual incrementing of the number you're having issues with, or is it saving the value to a database?

i jst want to increment the numbr in the database

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.