- ASP结果集的记录数都是-1,但实际是有记录的,不知为什么?
dim Sql Sql="SELECT site_no as value,site_desc as name FROM dbo.产品类" Set SITEds_cmd = Server.CreateObject ("ADODB.Command") SITEds_cmd.ActiveConnection = MM_xfydata_STRING SITEds_cmd.CommandText = "SELECT site_no as value,site_desc as name FROM dbo.产品类" SITEds_cmd.Prepared = true Set rs = SITEds_cmd.Execute response.Write rs.recordcount 结果都是-1,但实际是有记录的,不知为什么? 谢谢指导。
2020-07-22 - asp做后台,如何转为json提交给小程序setdata?
想用ASP+MSSQL做后台,但不知道如何response.Write 到前台小程序端,让小程序能够渲染的格式JSON, 有没有师傅,请教一下,找了很多资料都不行。 非常感谢! asp代码如下: <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <%response.ContentType = " text/json " %> <!--#include file="json.asp"--> <!--#include file="Connections/xfydata.asp" --> <% Dim SITEds Dim SITEds_cmd Dim SITEds_numRows Set SITEds_cmd = Server.CreateObject ("ADODB.Command") SITEds_cmd.ActiveConnection = MM_xfydata_STRING SITEds_cmd.CommandText = "SELECT site_no as value,site_desc as name,'false' as checked FROM dbo.产品类" SITEds_cmd.Prepared = true Set SITEds = SITEds_cmd.Execute jsonStr = "" rows = "" Dim i,json_rows,json_ret,arr_rows Dim myArray(3,3) Set jsonObj=New json jsonObj.toResponse=False Set json_ret = server.createobject("scripting.dictionary") Dim line1 line1=0 While Not (SITEds.EOF Or SITEds.BOF) i=0 For Each col In SITEds.Fields myArray(line1,i)=col.value i=i+1 Next line1=line1+1 SITEds.MoveNext Wend 'json_ret.Add "total",line1 json_ret.Add "rows",myArray jsonStr = jsonObj.toJSON(Empty,json_ret,False) response.Write jsonStr SITEds_numRows = 0 %> <% SITEds.Close() Set SITEds = Nothing %> 在小程序端输出结果: data: rows:(16)["A","B","","","测试账号","美的风扇"....] 我想要的结果是: SETDATA如下格式 data: { items: [ { value: 'CHN', name: '中国', checked: 'true' } ] }, 再次感谢
2020-07-22 - 云开发db.collection里where问题,如何实现sql查询语句in的条件语法?
数据表如下: table1:openid,field1,field2.... table2:openid1,openid2 请教各伴大神,如何在云开发实现SQL查询功能,如下: 即查找某字段在某数组内的所有记录 sql语法: select * from table1 where openid in (select distinct openid2 from table2 where openid1='123456789456') 非常感谢
2020-02-11 - 提交审核失败system error
提交不到,可否帮忙查查,APPID:wxea922bf6db2c41d3 谢谢 [图片]
2017-08-31