guyz i need your help..i'm still developing my project bout evaluation of employees. I'm using the code below,I want to multiply the values of the two specific row/column inside my datatable and then insert the product in the KPIGRDEQUI field in the KWEEKDTL table.Is it possible to be done? please see attached screen shot for what I encountered when the program executes..hope you help me here guyz.

scmd = New SqlCommand("INSERT INTO KWEEKDTL(KPIGRDEQUI) VALUES(('" & dtcheck.Rows(0).Item(5) & "' * '" & dtcheck.Rows(0).Item(8) & "' ))", sqlcon)
                    scmd.CommandType = CommandType.Text
                    sqlcon.Open()
                    dr = scmd.ExecuteReader
                    dr.Read()
                    sqlcon.Close()

Alway use parameterized query.

scmd = New SqlCommand("INSERT INTO KWEEKDTL(KPIGRDEQUI) VALUES (@para1)",sqlcon)

scmd.Parameters.AddWithValue("@para1",dtcheck.Rows(0).Item(5) & "' * '" & dtcheck.Rows(0).Item(8) & "'")

sqlcon.Open()
scmd.ExecuteNonQuery()
sqlcon.Close()

How to use [code] tags?

[code]
   ....
   .... code here
[/code]
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.