My situation is to update the balance in database.In database i have 3 column which is user name, pin code, and the balance.i have three customer, each customer have user name, pin code, and balance.The question is how to update balance of customer first, how to update customer second, and how to update customer third and so on?using vb 2003.please someone help me.newbie..
ogimy 0
Newbie Poster
Recommended Answers
Jump to PostIf u know how many records want to update, go for loop and update it one by one with condition.
Jump to PostTry this,
string InsertQuery =string.Empty; SqlConnection con1 = new SqlConnection("Specify the connection string details"); con1.Open(); SqlDataAdapter ada = new SqlDataAdapter("Select username from test123", con1); DataSet ds = new DataSet(); ada.Fill(ds); SqlCommand cmd1 = null; for (int j = 0; j < ds.Tables[0].Rows.Count; j++) { InsertQuery = "Update …
All 6 Replies
Renukavani 0
Junior Poster
ogimy 0
Newbie Poster
Renukavani 0
Junior Poster
ogimy 0
Newbie Poster
Renukavani 0
Junior Poster
Oxiegen 88
Basically an Occasional Poster Featured Poster
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.