您的位置:首页网页设计ASP实例 → 制作我们自己的Ebay拍卖系统4

制作我们自己的Ebay拍卖系统4

时间:2004/11/7 2:52:00来源:本站整理作者:蓝点我要评论(0)

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.








相关阅读 Windows错误代码大全 Windows错误代码查询激活windows有什么用Mac QQ和Windows QQ聊天记录怎么合并 Mac QQ和Windows QQ聊天记录Windows 10自动更新怎么关闭 如何关闭Windows 10自动更新windows 10 rs4快速预览版17017下载错误问题Win10秋季创意者更新16291更新了什么 win10 16291更新内容windows10秋季创意者更新时间 windows10秋季创意者更新内容kb3150513补丁更新了什么 Windows 10补丁kb3150513是什么

文章评论
发表评论

热门文章 没有查询到任何记录。

最新文章 迅雷新手完全入门手册 asp下面javascript上传图片限制格式大小方法告诉大家网页弹出窗口应用总结ASP常见错误类型大全asp常见错误分析和解决办法

人气排行 总是弹出visual studio 实时调试器 三种解决SQLSERVER存储过程及调用详解Asp获取真实IP地址ASP中连接Mssql的几种方法一个简单好用的UBB编辑器(含代码)如何用Split将字符串转换为数组并获取数组下ASP防止表单重复提交的办法告诉你免费的简单聊天室源代码