快精灵印艺坊 您身边的文印专家
广州名片 深圳名片 会员卡 贵宾卡 印刷 设计教程
产品展示 在线订购 会员中心 产品模板 设计指南 在线编辑
 首页 名片设计   CorelDRAW   Illustrator   AuotoCAD   Painter   其他软件   Photoshop   Fireworks   Flash  

 » 彩色名片
 » PVC卡
 » 彩色磁性卡
 » 彩页/画册
 » 个性印务
 » 彩色不干胶
 » 明信片
   » 明信片
   » 彩色书签
   » 门挂
 » 其他产品与服务
   » 创业锦囊
   » 办公用品
     » 信封、信纸
     » 便签纸、斜面纸砖
     » 无碳复印纸
   » 海报
   » 大篇幅印刷
     » KT板
     » 海报
     » 横幅

制作我们自己的EBAY(拍卖系统)(4)

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.
返回类别: 教程
上一教程: 一个简朴的网上书城的例子(六)
下一教程: 浅析ASP内置组件

您可以阅读与"制作我们自己的EBAY(拍卖系统)(4)"相关的教程:
· 制作我们自己的EBAY(拍卖系统)(3)
· 制作我们自己的EBAY(拍卖系统)(5)
· 制作我们自己的EBAY(拍卖系统)(7)
· 制作我们自己的EBAY(拍卖系统)(9)
· 制作我们自己的EBAY(拍卖系统)(2)
    微笑服务 优质保证 索取样品