Hi
I installed ASP and MSSQL(SQL Express Edition, SQL Manager 2005 for SQL
Server Lite).
- ASP is runnig correctly
- With SQL Manager 2005 for SQL I can create Databases and tabels and some
records...
I can not connect from an ASP script (example follows at the end). I've get
an error message in the internet explorer (after loading my asp script):
"Technical Information (for support personnel)
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'sa'.
The user is not associated with a trusted SQL Server connection.
/index.asp, line 22
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.1; .NET
CLR 2.0.50727)
Page:
GET /index.asp
Time:
Freitag, 29. September 2006, 09:13:42
More information:
Microsoft Support "
I've looked at this site:
http://support.microsoft.com/default.aspx?scid=kb;en-us;555332 but it
doesn't help me cause I cant find the properties of the Resulution.
I've got no idea what else I can do:( Hopfully you understanding my crap
english;)
Thanks for helping!
Pascal Suter
By the way I was talking about this asp script:
<% OPTION EXPLICIT %>
<%
'declare the variables
Dim Connection
Dim ConnString
Dim Recordset
Dim SQL
'define the connection string, specify database driver
ConnString="DRIVER=SQL Server;SERVER=localhost\SQLEXPRESS;UID=sa;" & _
"PWD=;DATABASE=master"
'declare the SQL statement that will query the database
SQL= "SELECT test FROM test"
'create an instance of the ADO connection and recordset objects
Set Connection = Server.CreateObject("ADODB.Connection")
Set Recordset = Server.CreateObject("ADODB.Recordset")
'Open the connection to the database
Connection.Open ConnString
'Open the recordset object executing the SQL statement and return records
Recordset.Open SQL,Connection
'first of all determine whether there are any records
If Recordset.EOF Then
Response.Write("No records returned.")
Else
'if there are records then loop through the fields
Do While NOT Recordset.Eof
Response.write Recordset("test")
Response.write "<br>"
Recordset.MoveNext
Loop
End If
'close the connection and recordset objects to free up resources
Recordset.Close
Set Recordset=nothing
Connection.Close
Set Connection=nothing