可是不对。提示说服务器错误,该页无法显示,请高手帮我看看哪里错了。多谢大家。作者: 蓝带鱼 时间: 2002-01-15 14:15
报的是哪一行错误?
conn.Open
后面有连接字串吗?作者: zhlbiti 时间: 2002-01-15 17:49
Public Function CS_AddAuction(strProductID As String, strProductName As String, _
strProductDesc As String, lngUpsetPrice As Long, lngQuantity As Long, strRule As String, _
strIssueBy As String, dtmStartDate As Date, dtmInvalidDate As Date, _
lngIsOrderEnd As Long, lngIssueMode As Long, Optional strApplyTo As String = \"\" As Long
Dim conDbLegend As ADODB.Connection
Dim strT_Auction As String
Dim lngAuction_ID As Long
Dim recAuction As ADODB.Recordset
Dim ojbCommon As LegendPublic.common
Dim lngIsAuctionID As Long
Dim strDept_ID As String
Dim strSql As String
Dim rs As ADODB.Recordset
Dim blnIstrans As Boolean
Dim strEndTime As String
Dim dtmEndTime As Date
On Error GoTo cs_addauctionerror
\'数据库连接
Set conDbLegend = New ADODB.Connection
conDbLegend.Open strConString
\'
Set rs = New ADODB.Recordset
strSql = \" SELECT DEPT_ID\" _
& \" FROM CS_DEPT_REF \" _
& \" WHERE CS_ID = \'\" & strIssueBy & \"\'\"
\'SqlStr = \"select T_BidOrder.Auction_ID, Product_ID, ProductName,UpsetPrice,Order_ID, Agent_ID,Bidding, T_BidOrder.Quantity AS quantity from T_Auction,T_BidOrder where T_Auction.auction_id=T_BidOrder.auction_id and T_bidorder.Order_Id=\" & lOrderId
rs.Open strSql, conDbLegend, adOpenStatic, adLockReadOnly
If rs.RecordCount <> 1 Then
CS_AddAuction = -2
Set rs = Nothing
Set conDbLegend = Nothing
Exit Function
End If
\'recAuction.Close
recAuction.ActiveConnection = Nothing
Set recAuction = Nothing
Set ojbCommon = New LegendPublic.common
lngAuction_ID = ojbCommon.CS_AddToACL(conDbLegend, lngIssueMode, 2, lngAuction_ID, strApplyTo)
If lngAuction_ID < 0 Then
conDbLegend.RollbackTrans
CS_AddAuction = -1
Set ojbCommon = Nothing
conDbLegend.Close
Set conDbLegend = Nothing
Exit Function
End If
conDbLegend.CommitTrans \'提交事务
blnIstrans = False
CS_AddAuction = 1
Set ojbCommon = Nothing
conDbLegend.Close
Set conDbLegend = Nothing
Exit Function
\'出错处理
cs_addauctionerror:
If blnIstrans Then
conDbLegend.RollbackTrans \'撤销事务
End If
CS_AddAuction = -1
If Not conDbLegend Is Nothing Then
conDbLegend.Close
Set conDbLegend = Nothing
End If
Select Case Err.Number
Case Else
Err.Raise Err.Number
End Select