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...b;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
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
%>
YOu have only Windows Authentication enbaled but you are using a SQL
user in your connection string. Either use integrated authentication or
switch to Mixed mode. More details on that on my website under the
screencasts sections
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||Jens schrieb:
> YOu have only Windows Authentication enbaled but you are using a SQL
> user in your connection string. Either use integrated authentication or
> switch to Mixed mode. More details on that on my website under the
> screencasts sections
Thanks for your help. But it's exactly the same problem like in my link
below. There's a different program then I have. Unfortunatly I can't find
this settings. Probably the not exists? I have really no idea how I can fix
it
|||Jens schrieb:
> YOu have only Windows Authentication enbaled but you are using a SQL
> user in your connection string. Either use integrated authentication or
> switch to Mixed mode. More details on that on my website under the
> screencasts sections
> HTH, Jens K. Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
I've done this change, but if I want login on Microsoft SQL Server
Management Studio Express the login fails. Where can I change/create Login
names and permissions?
thanks for your help
Pascal Suter
|||Am I something like a selfentertainer?;) However, I found a solution for my
problem but acutally your link was the key!
great thanks
Pascal Suter
No comments:
Post a Comment