逗号,')',或者是一个有效的表达式延续期望。这是我运行代码时在浏览器上出现的错误 [英] Comma, ')', or a valid expression continuation expected.that is the error am getting on my browser when I ran the code

查看:48
本文介绍了逗号,')',或者是一个有效的表达式延续期望。这是我运行代码时在浏览器上出现的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 公共 功能 sp_payment_fetch()
尝试
Dim obj 作为 OBJ_BIA
obj.MEMBER = mkl
obj.EARNING = jj
obj。 CASES = 0
obj.CLOSED = 0
obj.RATE = u%
Dim ds As DataSet = _DAL.SP_PAYMENT_Fetch(_obj As OBJ_BIA) As 系统m.Data.DataSe
Dim dt0 As DataTable = ds.tables( 0
Dim build As StringBuilder = < span class =code-keyword>新 StringBuilder
build.Append( { data_table_0: + bll.serializejson(dt0)+ }
clients.caller.load_row_one_client(build.ToString)
bll.writelog(build.ToString)
Catch ex As 异常
bll.writelog(ex.StackTrace + + ex.Message)
结束 尝试
结束 功能
结束





< b>我尝试了什么:



i一直试图通过在值

解决方案<上添加逗号来纠正它/ div>

你好,

当你没有正确连接(加入)字符串时会出现这个错误...

错误在这里

 build.Append({data_table_0:+ bll.serializejson(dt0)+})



应该是

 build.Append({+data_table_0+:+ bll.serializejson(dt0)+})


Public Function sp_payment_fetch()
            Try
                Dim obj As New OBJ_BIA
                obj.MEMBER = "mkl"
                obj.EARNING = "jj"
                obj.CASES = 0
                obj.CLOSED = 0
                obj.RATE = "u%"
                Dim ds As DataSet = _DAL.SP_PAYMENT_Fetch(_obj As OBJ_BIA) As System.Data.DataSe
                Dim dt0 As DataTable = ds.tables(0)
                Dim build As StringBuilder = New StringBuilder
                build.Append("{""data_table_0"":" + bll.serializejson(dt0) + "}")
                clients.caller.load_row_one_client(build.ToString)
                bll.writelog(build.ToString)
            Catch ex As Exception
                bll.writelog(ex.StackTrace + ": " + ex.Message)
            End Try
        End Function
    End Class



What I have tried:

i have been trying to correct it by adding comma to the values

解决方案

Hello ,
This error comes when You are not concatenating (joining) the strings proerly...
Error is here

build.Append("{""data_table_0"":" + bll.serializejson(dt0) + "}")


It should be

build.Append("{"+ "data_table_0"+ ":" + bll.serializejson(dt0) + "}")


这篇关于逗号,')',或者是一个有效的表达式延续期望。这是我运行代码时在浏览器上出现的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆