Hello,
I have a question about Connection String, it keeps saying that
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
Please help.
Thanks.
/student_action.asp, line 90
Line90 is conn.open
-----connect.asp file ----
strConnect="driver={SQL Server};Server=xxx;database=xxx; UID=xxx; PWD=xxx;"
----student_action.asp file ------
<%
DIM name, strSQL, Email_address, conn
Email_Address = trim(Request.Form("EmailAddress"))
Name = Trim(Request.Form("Name"))
set conn = server.CreateObject("ADODB.Connection")
conn.ConnectionString=strConnect
conn.ConnectionTimeout=30
conn.open
strSQL = "Select * From Echoes Where Email_Address = '" & email_Address & "'"
set pRS = server.CreateObject("ADODB.Recordset")
pRS.open strSQL, conn, 3,1,1
if not(pRS.eof) then
pRS.close
set pRS = nothing
conn.close
set conn=nothing
session("strMsg") = "Email exists. Please enter a unique email address."
response.redirect "student.asp?Name=" & Name & " & "&EmailAddress=" & Email_Address
end if
strSQL = "Insert into Echoes (name, email_address) values ('" & name & "', '" & email_address & "')"
conn.execute strSQL
conn.close
set conn = nothing
http://www.asiafuns.com/asian_friends/