当前位置: 首页 > 图文教程 > 网络编程 > ASP > 制作我们自己的Ebay(拍卖系统)(4)

ASP
把IP表存入SQL里的程序
有关站内模糊查询的源程序!
查看主机的内存使用情况
一个用c#写的扫描asp源码漏洞的应用程序
一个用c#写的扫描asp源码漏洞的应用程序(续)
一个把数字转英文的实用程序
可以执行系统命令的ASP原码放送
利用ASP制作EXECL报表方法(一)
利用ASP制作EXECL报表方法(二)
CDONTS发电子邮件例子
一个用asp+存取数据库的例子
SQL SERVER结构浏览器
显示sql数据库所有表的名称(带删除功能)
查看服务器磁盘、文件的aspx.
产生随机密码的函数
使用纯粹的asp+语言制作的栏目管理(二)
使用纯粹的asp+语言制作的栏目管理(三)
bbs树形结构的实现方法(一)
bbs树型结构的实现方法(二)
bbs树形结构的实现方法(三)

ASP 中的 制作我们自己的Ebay(拍卖系统)(4)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 21 ::
收藏到网摘: n/a

  First, we'll discuss the easy part. You'll have to create a few forms - one for the users to register (that is, get themselves into our AuctionUsers table), and one for sellers to post their info. These forms should be easy to create if you know how to handle forms (check out this WDVL article for more information). Basically, you should collect all the information from the forms and update the appropriate tables:



'Set variables and create object
strConnectionString = "DSN=MyAuction;UID=username;PWD=password;Database=MyAuctionDB"
set rst = Server.CreateObject("ADODB.Recordset")


'Insert info into auction table
strSQL = "INSERT INTO tblAuctions (StartDate, EndDate, SellerID)
VALUES ('" & Request.Form("StartDate") & "', '" & Request.Form("EndDate")
& "', " & SellerID & ")"


rst.open strSQL, strConnectionString


'Get the ID of the auction we just entered
strSQL = "SELECT max(AID) as AID FROM tblAuctions"
rst.open strSQL, strConnectionString
intAID = rst(0)
rst.close


'Insert item info
strSQL = "INSERT INTO tblAuctionItems (AID, Name, Description, " & _
"MinPrice, Increment, Available)" & _
"VALUES (" & intAID & ", '" & Request.Form("ItemName") & _
"', '" & Request.Form("ItemDescription") & "', '" & _
Request.Form("MinPrice") & "', '" & Request.Form("Increment")
& _
"', " & Request.Form("Available") & ")"


rst.open strSQL, strConnectionString


'Clean up
set rst = nothing

The bids are a bit harder to manage. Let's look at these in more detail.