jayroldvicencio 0 Newbie Poster

Hi there. Im new to asp programming. And I am doing a research project for my school.

I'm create a website with MS SQL SERVER 2005 with ASP. But the problem is the right connection. I have searched the web almost 2 weeks but nothing happened.

Here's what my code for the connection

<%
<%
dim con, Rs
set con=server.CreateObject("adodb.connection")
con.Open "Provider=sqloledb;SERVER=localhost;DATABASE=SMS;UID=sa;PWD=;"
set Rs=server.CreateObject("adodb.recordset")
%>

and here's the error message

Microsoft OLE DB Provider for SQL Server (0x80004005)
Login failed for user 'sa '. The user is not associated with a trusted SQL Server connection.
/SEARCH MANAGEMENT SYTEM WEBSITE/sample.asp, line 4

Please help me with my problem. And can you teach me how to connect using Windows Authentication in MS SQL?

Response is highly appreciated. Thanks guys.