This is the exact code I am getting the error with:
vb Code:
Private Function GetInvoiceNo() As Long conn.Open() Dim cmd As New SqlCommand("SELECT Order_Ctrl_Online from Order_ctrl") GetInvoiceNo = cmd.ExecuteScalar cmd.CommandText = "Update Order_Ctrl SET Order_Ctrl_Online = Order_Ctrl_Online + 1" cmd.ExecuteNonQuery() conn.Close() End Function




Reply With Quote