I have written the following code:
strConnection ="Provider=SQLOLEDB;Server=PC-101\SQLEXPRESSR2;Database=LDS;Integrated Security=true"
Set rs = Server.CreateObject("ADODB.Recordset")
select_SQL = "select * from tblMonthlySales order by store_id"
On Error Resume Next
rs.open(strConnection , select_SQL)
If Err.Number <> 0 Then
response.Write(Err)
On Error Goto 0 ' But don't let other errors hide!
' Code to cope with the error here
End If
On Error Goto 0 ' Reset error handling.
I am using SQL Server 2008 for my database.
And I am not able to catch the error and getting this message
An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator please click here to find out more about this error.
Is my connecting string wrong?
I had also tried this connection string:
strConnection ="Provider=SQLNCLI10;Server=PC-101\SQLEXPRESSR2;Database=LDS;Integrated Security=SSPI;DataTypeCompatibility=80;"
Any help is appreciated