Function ProProductId()
set rs=server.createobject("adodb.recordset")
sql = "select max(Product_id) as proid from Products"
rs.open sql,conn,1,1
product_id=rs("proid")
if product_id="" then
product_id=1000
else
product_id=product_id+1
end if
ProProductId=product_id
'response.Write(ProProduct_id) 这一句有正确得到数值
rs.close
set rs = null
end Function一下调用却不能出现结果
<%
x=ProProductId()
response.Write(x)
%>
大家帮忙看看
set rs=server.createobject("adodb.recordset")
sql = "select max(Product_id) as proid from Products"
rs.open sql,conn,1,1
product_id=rs("proid")
if product_id="" then
product_id=1000
else
product_id=product_id+1
end if
ProProductId=product_id
'response.Write(ProProduct_id) 这一句有正确得到数值
rs.close
set rs = null
end Function一下调用却不能出现结果
<%
x=ProProductId()
response.Write(x)
%>
大家帮忙看看
解决方案 »
- vb 使用webbroswer 打开word文档 想显示菜单栏 怎么办?
- 询问:VB函数名后有符号& ,以及定义变量时候用符号& ¥是什么意思
- 求助!!!
- 有那位知道是不是有Linux下的BASIC语言!
- wingchi来拿分,顺便问个问题
- ???怎样让屏幕不闪!!!
- vb中ActiveMovie控件的问题?
- 请问各位VB程序员,VB目前在中国有多大市场?现在学VB还有没有前途(与VC,JAVA,Dephi相比)?
- 如何将FORM设置为最大化
- VB中的#是什么意思?比如说: Open "C:\GisChina\DeerMoney.txt" For Input As #1 是什么意思呢?
- 请问如何用 TreeView_InsertItem()
- 关于DATAGRID的问题
Dim Rs
Dim Sql
Dim Product_Id
Set Rs = Server.CreateObject("adodb.recordset")
Sql = "select Max(Product_id) as proid from Products"
Rs.Open Sql, Conn, 1, 1
If IsNull(Rs("proid")) Then
Product_Id = 1000
Else
Product_Id = Rs("proid") + 1
End If
ProProductId = Product_Id
Rs.Close
Set Rs = Nothing
End Function
<%
x=ProProductId() ‘你在这里看看数值有没有传递过来就是了
response.Write(x)
%>
x为多少啊?