最近更新   设为主页   制作我们自己的Ebay拍卖系统5 加入收藏  
计算机基础教程网 本站招聘  
 [投稿登 陆]    [问题求解或论坛登 陆]
ITWEN首页操作系统网络冲浪办公软件网页设计图形图象认证考试程序设计数据库其它文章交流论坛  
  当前位置:ITWen >>  ASP  >>  制作我们自己的Ebay拍卖系统5
制作我们自己的Ebay拍卖系统5
作者:ItWen收集整理    来源:www.itwen.com    更新时间:2006-11-23
[ 收藏此页到: 天天 | 和讯 | 博采 | ViVi | 狐摘 | 我摘 ]  
  

This is the complex part - you must make sure everyone's bids are correct, update those that have proxy bids, reallocate lots to winners, notify buyers who have been outbid, and perform some upkeep.
First let's look at the code to add a bid.
Function DoBid(ItemID, BidderID, Price, optional MaxPrice, optional MaxItems)
'Set variables and create objects
strConnectionString = "DSN=MyAuction;UID=username;PWD=password;Database=MyAuctionDB"
set rst = Server.CreateObject("ADODB.Recordset")
'Check to see if a bid already exists for this buyer and auction
strSQL = "SELECT BID FROM tblAuctionBids WHERE IID = " & ItemID & " AND " & _
"UID = " & BidderID
rst.open strSQL, strConnectionString
if rst.eof then 'A bid does not exist
rst.close
'Insert info into table
strSQL = "INSERT INTO tblAuctionBids (IID, UID, WinPrice, MaxBid, " & _

"BidItems, WinItems, Time VALUES (" & ItemID & ", " & BidderID & _
", '" & Price & "', '" & MaxPrice & "', " & MaxItems & _
", 0, '" & Now() & "')"
'Default WinItems to 0 for now
else 'A bid does exist
rst.close
'Update info in table
strSQL = "UPDATE tblAuctionBids SET WinPrice = '" & Price & _
"' WHERE IID = " & ItemID & " AND UID = " & BidderID
end if
rst.open strSQL, strConnectionString
'Fix bidding information
call ResolveBids(ItemID)
End Function
NOTE: This code above is developed for Visual Basic, and the keyword "optional" in the function opener is not supported in VBScript. In an ASP then, simply leave out the keyword "optional" here, and when you call the function, pass in an empty string, i.e.:
call DoBid(ItemId, BidderID, Price, "", "")
This function basically takes some info, and either inserts it or updates it in the Bids table - fairly simple stuff. The function ResolveBids however is where all the good stuff happens.
(完)计算机基础教程网


  引用提示:
  内容页面:制作我们自己的Ebay拍卖系统5 --- ASP
  作者:ItWen收集整理
  来源:www.ITWEN.com 计算机基础教程网
  

  版权申明:
  本网站所有内容,未经注明的,版权一律属于计算机基础教程网(ITWEN.com)制作署所有。转载引用本网站的原创文章,请务必注明信息来源,标明“计算机基础教程网(ITWEN.com)”字样。
  计算机基础教程网(ITWEN.com)依法保护知识产权,如果我们的文章有涉及或侵犯您的有关权益,请即时与我们联系, 注明网址及文章,我们会即时处理或删除, 感谢您的合作!   


】 【返回站点首页】【打印本页】【关闭本页
     资料搜索
     热门文章
·apache1.3 与tomcat
·RationalXDEDevelo
·回答为什么执行JAVA程序时,会出
·Java Servlet和JSP教
·亲密接触ASP.Net16
·非常好的东西,有助于学习css虑镜
·将数据库里面的内容生成EXCEL
·抓取网页萃取网页内容的代码 选择自
·JavaScript技巧环绕三维文
·wave函数介绍
·常见故障ADSL拨号超时故障的解决
·数据从sqlserver导入mys
·网页常用特效整理高级篇1
·原创建立QINTER外可用于交互式
·VoIP问答
     前面文章
·Win98和WinMe双启动的实现
·避免表单的重复提交又一方法js
·AS2数组使用小结
·Win98中隐藏的有用文件
·常用Email组件发送函数
·也说C#实现对Word文件读写
·ADO错误代码
·过程,函数,程序包
·802.1Q VLAN协议和802
·AspectSharp例子分析
·ASP开发网页牢记注意事项
·ObjectPascal编程风格通
·图像变形Deforme 软件教学
·专家答疑2003年,微软认证路在何
·打造安全的Win2003操作系统下
·MPLS实例
·Windows中获取本机动态IP地
·远程备份
·Linux 和 Windows 共
·Win98启动模式菜单

文章: 制作我们自己的Ebay拍卖系统5 已经被浏览了 次。
免责声明 | 关于我们 | 广告联系 | 友情链接 | 帮助设置 | 网站导航 | 最近更新 | 共同合作
计算机基础教程网(www.ITwen.com) 版权所有
copyright 2005-2006,All Rights Reserved
计算机基础教程网