|
-
Oct 27th, 2004, 02:42 AM
#1
Thread Starter
Hyperactive Member
login error failed in SQLServer -- Resolved
I dont know why this error is comin in SQLHelper.vb
Code:
Line 714:
ByVal connectionOwnership As SqlConnectionOwnership) As SqlDataReader
Line 715: Dim mustCloseConnection As Boolean = False
Line 716: If (connection Is Nothing) Then Throw New ArgumentNullException("connection")
Line 717:
Line 718:' Create a command and prepare it for execution
Source File: G:\Program Files\Microsoft Application Blocks for .NET\Data Access v2\Code\VB\Microsoft.ApplicationBlocks.Data\SQLHelper.vb Line: 716
Exception Details: System.ArgumentNullException: Value cannot be null. Parameter name: connection
Please Help
Last edited by Kirun; Oct 29th, 2004 at 01:02 AM.
-
Oct 27th, 2004, 04:26 AM
#2
Thread Starter
Hyperactive Member
is the problem with the databse conection that i am using in a class in which this SQL helper is used for data retrieving.Is this a problem of permission of the database .
I have progrmme in my localhost and database is on another server.
Should any where in ASP i have to mention about the database path or not
In vb class i have mentioned the server name and passsord and and it was working at my
PC
-
Oct 27th, 2004, 05:19 AM
#3
This is one of the core reason I hate .NET
What is Connection?
Is it a connection string, or a connection object?
Why on earth don't .NET developers use:
VB Code:
Dim strConn As String
'or
Dim adoConn As ADOConnection
Makes life MUCH easier.
Woka
-
Oct 27th, 2004, 06:01 AM
#4
Thread Starter
Hyperactive Member
As i am using the SQLHelper Classes thats why the connection is the SQLconnection
I think some how the server name and databas is not reaching to the Connection (i am thinking loud )
Infact i have given the proper name of server and database in my VB class which i am using and in this VB class i am using the SQL helper classes for data retrieval.
cna any body have any idea or should i stop using the SQL helper and redesign the entire data retrival
-
Oct 28th, 2004, 04:46 AM
#5
Thread Starter
Hyperactive Member
login failed error
i figured out there is some problem in connectrion. some how the connection string is not appropriate. My application and my SQL server are not on one server i am kaing the connection string as follows
Code:
CONNECTIONSTRING = "data source=svr1;initial catalog=data1"
I have tried to insert integrated security and trusted connection as well but the error is still same.
I have also tried to put password and username in my connection string but itw as of no use. its giving me still following error
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection
Last edited by Kirun; Oct 28th, 2004 at 04:53 AM.
-
Oct 29th, 2004, 01:01 AM
#6
Thread Starter
Hyperactive Member
I figured it ..
Just add this to web.config file
VB Code:
<authentication mode="Windows" />
<identity impersonate="true" userName="domainname\username" password="pwd"/>
offcourse the username must be recognized by SQL server.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|