ASP购物车
您好,基于 http://www.15seconds.com/issue/010411.htm< 的示例/a> 我想创建一个 ASP 商店,但我想重写与数据库的连接,因为我没有专用服务器。 不是
Sub SubGetDSNCreateConn
strBasketDSN = Application("strBaskDSN")
set BaskConn = server.CreateObject ("ADODB.Connection")
BaskConn.ConnectionString = strBasketDSN
BaskConn.Open
End Sub
而
set SavedBaskConn = server.CreateObject ("adodb.connection")
SavedBaskConn.ConnectionString = Application("strBaskDSN")
SavedBaskConn.Open
,我想使用类似的东西:
conn="provider=sqloledb;server=localhost;uid=username;pwd=password;database=shop"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, conn
我无法让它工作..有人可以给我指出正确的方向或者给我一个更好的教程如何创建一个可以容纳大量流量的经典 ASP 购物车?
谢谢
Hello based on the example at http://www.15seconds.com/issue/010411.htm i will like to create an ASP shop but i would like to rewrite the connection to db as i don't have a dedicated server .
Instead of
Sub SubGetDSNCreateConn
strBasketDSN = Application("strBaskDSN")
set BaskConn = server.CreateObject ("ADODB.Connection")
BaskConn.ConnectionString = strBasketDSN
BaskConn.Open
End Sub
and
set SavedBaskConn = server.CreateObject ("adodb.connection")
SavedBaskConn.ConnectionString = Application("strBaskDSN")
SavedBaskConn.Open
i would like to use something like:
conn="provider=sqloledb;server=localhost;uid=username;pwd=password;database=shop"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, conn
and i can't make it work .. does anybody could point me in the right direction or give me a better tutorial how to create a classic ASP shopping cart that could hold a big traffic?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可以问为什么你不只是更改设置:
以满足你的要求,而不是完全更改代码?我很想检查 Application("strBaskDSN") 的内容并更改它们以匹配您自己的数据库。
如果我遗漏了一些明显的东西,请告诉我。
吉姆
can i ask why you don't just change the settings in:
to match your requirement, rather than changing the code entirely?? I would be tempted to examine the contents of Application("strBaskDSN") and just change those to match your own database.
If i'm missing something obvious, then let me know.
jim