.aspx中怎样取出具有指定属性值的一行中的某个属性值
比如说在user表中取出name="张三"的一行的password属性的值不要说用selectpasswordfromuserwherename=“张三”;我是说怎样用这...
比如说在user表中取出name="张三 "的一行的password属性的值
不要说用select password from user where name=“张三”;我是说怎样用这句话后把查到的结果取出来 展开
不要说用select password from user where name=“张三”;我是说怎样用这句话后把查到的结果取出来 展开
1个回答
展开全部
Dim conn As New ADODB.Connection
Dim xsxx As New ADODB.Recordset
xsxx.CursorLocation = ADODB.CursorLocationEnum.adUseClient
conn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("./") & "\app_data\kczb.mdb")
xsxx.Open("select password from user where name='张三'"), conn, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockBatchOptimistic)
response.write(xsxx.fields("password")
Dim xsxx As New ADODB.Recordset
xsxx.CursorLocation = ADODB.CursorLocationEnum.adUseClient
conn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("./") & "\app_data\kczb.mdb")
xsxx.Open("select password from user where name='张三'"), conn, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockBatchOptimistic)
response.write(xsxx.fields("password")
追问
谢了,我已经搞定了,用的ExecuteReader()
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询