Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

vb. Net task problem.function problem with mysql query

$
0
0
VB.NET

Try
            Dim CNo As New MySqlConnection(cnString)
            CNo.Open()
            Dim strSQLo As String
            strSQLo = "select sum(b1credit + d1credit + c1credit + jv1credit),sum(b1DEBIT + d1DEBIT + c1DEBIT + jv1DEBIT) from trial_balance group by account_title "
            cmd = New MySqlCommand(strSQLo, CNo)
            dr = (cmd.ExecuteReader)
            dr.Read()

            If dr.HasRows Then
                dr.Read()
                If Val(dr(0)) < Val(dr(1)) Then
                    Call updatetrialbalancedebit()

                Else
                    Call updatetrialbalancecredit()
                End If
            End If
            Call FilListtrialbalance()
            CNo.Close()
            CNo.Dispose()
            cmd.Dispose()
        Catch ex As Exception
            MsgBox(ex.ToString)

        End Try



Please help.;..

-----when comparing the 2 array...only the callupdatetrialbalancedebit...is there something wrong with the query i made?

sorry--

-------when comparing the dr(0) to dr(1)...only the callupdatetrialbalancedebit is functioning...is there something wrong with the query i made? or the process?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>