|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Open connection with SQL server
hello
I use ASP.NET with SQL server 2000, hava a problem when I try to open the connection to my database which is in a sql server 2000 The Error is: Server Error in '/TrainingSystem' Application. -------------------------------------------------------------------------------- Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. Source Error: Line 24: Private Sub OpenConnection() Line 25: Cn = New SqlConnection(ConfigurationSettings.AppSettings("OpenDB")) Line 26: Cn.Open() Line 27: 'Try Line 28: ' Cn.Open() --------------------------------------------------------- I am using ASP.Net with VB script This code is on the web.config file <appSettings> <add key="OpenDB" value="Server=localhost;uid=sa;pwd=;database=TSdatabase;"></add> <!-- DYNAMIC INTRANET SETTING Set IsIntranet value="true" to insert is Student option in user Administration --> <add key="isIntranet" value="false"></add> </appSettings> On the VB file I have this code: Public Cn As New SqlConnection() Private Sub OpenConnection() Cn = New SqlConnection(ConfigurationSettings.AppSettings("OpenDB")) Cn.Open() End Sup and I call it in the sub Page_Load Thx Pls help me I can not Find the error ![]() ![]() ![]() |
|
#2
|
||||
|
||||
|
|
|
#3
|
|||
|
|||
|
thx
Thx
I found the error I had check one option to one options in the SQL sercer, to be the user able, to use the server not only the window. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Open connection with SQL server |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|