有关“用户注册与数据库连接”的问题

来源:百度知道 编辑:UC知道 时间:2024/06/18 12:15:52
先建了一个储存用户信息的数据表,制作用户注册页面。

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
</head>

<body>
<%user=trim(request.form("user"))
if user=empty then
%><script>alert('帐号不能为空');history.back();</script><%

应该是
conn.open( "PROVIDER=SQLOLEDB;DATA SOURCE=localhost;UID=sa;PWD=1234;DATABASE=example");
这样才对吧,LZ你怎么不打括号?

conn.open "PROVIDER=SQLOLEDB;DATA SOURCE=localhost;User id=sa;Password=1234;Initial Catalog =example;"