I have created a MS SQL DB called 'PiccoCeraci'.
It is running on my local machine.
I have this script, called MSSQL.asp:
When i run the script in IE7, i get this error:
<title>Queries from the MS-SQL database with ASP</title>
<h2>Query from table <b>products</b> with ASP</h2>
Set conn = Server.CreateObject("ADODB.Connection")
'This code block will create a recordset
Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "select * from products"
rs.open SQL, conn
'will iterate to display the records got from the database
While Not rs.EOF
response.write(rs("id") & " " & rs("price"))
'closes the connection
Set rs = Nothing
Set conn = Nothing
Microsoft OLE DB Provider for SQL Server error '80040e4d'
Login failed for user 'Craig R Morton'.
/picco/MSSQL.asp, line 9
When i test the data source in the Administrative Tools>Data Sources (ODBC) in the Control Panel i get this:
Microsoft SQL Server ODBC Driver Version 03.85.1117
Running connectivity tests...
Verifying option settings
Disconnecting from server
TESTS COMPLETED SUCCESSFULLY!
However, it asks 'How should SQL Server verify the authenticity of the login ID? I have selected 'With Win NT authentication' as the connectivity tests fail with the other option 'login id and password will be entered by the user'......which i want?
How can i set the u/name and p/word for this DB? and get it to run in my script?
Thanks in advance.