SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 SQL Server does not exist or access denied
 Forum Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

tkizer
Almighty SQL Goddess

USA
37143 Posts

Posted - 09/08/2004 :  14:08:24  Show Profile  Visit tkizer's Homepage
Try connecting to your SQL Server inside Query Analayzer using VNASIBI-3RJ2051 instead of (local). Let us know if it works.

Tara
Go to Top of Page

vnasibi
Starting Member

USA
17 Posts

Posted - 09/08/2004 :  16:45:19  Show Profile
My bad...had a long meeting, then lunch. Just checked Query Analyzer again. Only have (local) and the network server.

If you can't make it good, make it look good!
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37143 Posts

Posted - 09/08/2004 :  16:49:27  Show Profile  Visit tkizer's Homepage
Did you try VNASIBI-3RJ2051 instead of (local). You manually type it in then connect.

Tara
Go to Top of Page

vnasibi
Starting Member

USA
17 Posts

Posted - 09/08/2004 :  16:54:20  Show Profile
Did that. Run a simple select query. Worked fine

If you can't make it good, make it look good!
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37143 Posts

Posted - 09/08/2004 :  16:56:17  Show Profile  Visit tkizer's Homepage
Then something is wrong with your connection string. Not sure what though.

Tara
Go to Top of Page

vnasibi
Starting Member

USA
17 Posts

Posted - 09/08/2004 :  17:33:26  Show Profile
Hey Tara:
This thing is mutating now...I went ahead and assigned variables to the SQLAdapter and the Dataset. This is the code from the webform:
Imports System.IO
Imports System.Data.SqlClient
Public Class Summary
Inherits System.Web.UI.Page
Dim PJ As SqlConnection
Dim adptProjects As SqlDataAdapter
Protected WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection
Protected WithEvents SqlDataAdapter1 As System.Data.SqlClient.SqlDataAdapter
Protected WithEvents SqlSelectCommand1 As System.Data.SqlClient.SqlCommand
Protected WithEvents SqlInsertCommand1 As System.Data.SqlClient.SqlCommand
Protected WithEvents SqlUpdateCommand1 As System.Data.SqlClient.SqlCommand
Protected WithEvents SqlDeleteCommand1 As System.Data.SqlClient.SqlCommand
Protected WithEvents DsProjects1 As ISHelpDeskv1.dsProjects
Dim dsProjects As New dsProjects



#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection
Me.SqlDataAdapter1 = New System.Data.SqlClient.SqlDataAdapter
Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand
Me.SqlInsertCommand1 = New System.Data.SqlClient.SqlCommand
Me.SqlUpdateCommand1 = New System.Data.SqlClient.SqlCommand
Me.SqlDeleteCommand1 = New System.Data.SqlClient.SqlCommand
Me.DsProjects1 = New ISHelpDeskv1.dsProjects
CType(Me.DsProjects1, System.ComponentModel.ISupportInitialize).BeginInit()
'
'SqlConnection1
'
Me.SqlConnection1.ConnectionString = "workstation id=""VNASIBI-3RJ2051"";packet size=4096;integrated security=SSPI;data s" & _
"ource=""VNASIBI-3RJ2051"";persist security info=False;initial catalog=NewProjects"
'
'SqlDataAdapter1
'
Me.SqlDataAdapter1.DeleteCommand = Me.SqlDeleteCommand1
Me.SqlDataAdapter1.InsertCommand = Me.SqlInsertCommand1
Me.SqlDataAdapter1.SelectCommand = Me.SqlSelectCommand1
Me.SqlDataAdapter1.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "tblProjects", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("ProjectID", "ProjectID"), New System.Data.Common.DataColumnMapping("ProjectTitle", "ProjectTitle"), New System.Data.Common.DataColumnMapping("ProjectDescription", "ProjectDescription"), New System.Data.Common.DataColumnMapping("ProjectAssignedto", "ProjectAssignedto"), New System.Data.Common.DataColumnMapping("StartDate", "StartDate"), New System.Data.Common.DataColumnMapping("ExpectedEndDate", "ExpectedEndDate"), New System.Data.Common.DataColumnMapping("ProjectStatus", "ProjectStatus"), New System.Data.Common.DataColumnMapping("Priority", "Priority"), New System.Data.Common.DataColumnMapping("PercentComplete", "PercentComplete")})})
Me.SqlDataAdapter1.UpdateCommand = Me.SqlUpdateCommand1
'
'SqlSelectCommand1
'
Me.SqlSelectCommand1.CommandText = "SELECT ProjectID, ProjectTitle, ProjectDescription, ProjectAssignedto, StartDate," & _
" ExpectedEndDate, ProjectStatus, Priority, PercentComplete FROM tblProjects"
Me.SqlSelectCommand1.Connection = Me.SqlConnection1
'
'SqlInsertCommand1
'
Me.SqlInsertCommand1.CommandText = "INSERT INTO tblProjects(ProjectID, ProjectTitle, ProjectDescription, ProjectAssig" & _
"nedto, StartDate, ExpectedEndDate, ProjectStatus, Priority, PercentComplete) VAL" & _
"UES (@ProjectID, @ProjectTitle, @ProjectDescription, @ProjectAssignedto, @StartD" & _
"ate, @ExpectedEndDate, @ProjectStatus, @Priority, @PercentComplete); SELECT Proj" & _
"ectID, ProjectTitle, ProjectDescription, ProjectAssignedto, StartDate, ExpectedE" & _
"ndDate, ProjectStatus, Priority, PercentComplete FROM tblProjects WHERE (Project" & _
"ID = @ProjectID)"
Me.SqlInsertCommand1.Connection = Me.SqlConnection1
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ProjectID", System.Data.SqlDbType.NVarChar, 12, "ProjectID"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ProjectTitle", System.Data.SqlDbType.NVarChar, 50, "ProjectTitle"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ProjectDescription", System.Data.SqlDbType.NVarChar, 500, "ProjectDescription"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ProjectAssignedto", System.Data.SqlDbType.NVarChar, 15, "ProjectAssignedto"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@StartDate", System.Data.SqlDbType.DateTime, 8, "StartDate"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ExpectedEndDate", System.Data.SqlDbType.DateTime, 8, "ExpectedEndDate"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ProjectStatus", System.Data.SqlDbType.NVarChar, 50, "ProjectStatus"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Priority", System.Data.SqlDbType.NVarChar, 10, "Priority"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@PercentComplete", System.Data.SqlDbType.Decimal, 9, System.Data.ParameterDirection.Input, False, CType(18, Byte), CType(0, Byte), "PercentComplete", System.Data.DataRowVersion.Current, Nothing))
'
'SqlUpdateCommand1
'
Me.SqlUpdateCommand1.CommandText = "UPDATE tblProjects SET ProjectID = @ProjectID, ProjectTitle = @ProjectTitle, Proj" & _
"ectDescription = @ProjectDescription, ProjectAssignedto = @ProjectAssignedto, St" & _
"artDate = @StartDate, ExpectedEndDate = @ExpectedEndDate, ProjectStatus = @Proje" & _
"ctStatus, Priority = @Priority, PercentComplete = @PercentComplete WHERE (Projec" & _
"tID = @Original_ProjectID) AND (ExpectedEndDate = @Original_ExpectedEndDate OR @" & _
"Original_ExpectedEndDate IS NULL AND ExpectedEndDate IS NULL) AND (PercentComple" & _
"te = @Original_PercentComplete OR @Original_PercentComplete IS NULL AND PercentC" & _
"omplete IS NULL) AND (Priority = @Original_Priority OR @Original_Priority IS NUL" & _
"L AND Priority IS NULL) AND (ProjectAssignedto = @Original_ProjectAssignedto OR " & _
"@Original_ProjectAssignedto IS NULL AND ProjectAssignedto IS NULL) AND (ProjectD" & _
"escription = @Original_ProjectDescription OR @Original_ProjectDescription IS NUL" & _
"L AND ProjectDescription IS NULL) AND (ProjectStatus = @Original_ProjectStatus O" & _
"R @Original_ProjectStatus IS NULL AND ProjectStatus IS NULL) AND (ProjectTitle =" & _
" @Original_ProjectTitle OR @Original_ProjectTitle IS NULL AND ProjectTitle IS NU" & _
"LL) AND (StartDate = @Original_StartDate OR @Original_StartDate IS NULL AND Star" & _
"tDate IS NULL); SELECT ProjectID, ProjectTitle, ProjectDescription, ProjectAssig" & _
"nedto, StartDate, ExpectedEndDate, ProjectStatus, Priority, PercentComplete FROM" & _
" tblProjects WHERE (ProjectID = @ProjectID)"
Me.SqlUpdateCommand1.Connection = Me.SqlConnection1
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ProjectID", System.Data.SqlDbType.NVarChar, 12, "ProjectID"))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ProjectTitle", System.Data.SqlDbType.NVarChar, 50, "ProjectTitle"))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ProjectDescription", System.Data.SqlDbType.NVarChar, 500, "ProjectDescription"))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ProjectAssignedto", System.Data.SqlDbType.NVarChar, 15, "ProjectAssignedto"))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@StartDate", System.Data.SqlDbType.DateTime, 8, "StartDate"))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ExpectedEndDate", System.Data.SqlDbType.DateTime, 8, "ExpectedEndDate"))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ProjectStatus", System.Data.SqlDbType.NVarChar, 50, "ProjectStatus"))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Priority", System.Data.SqlDbType.NVarChar, 10, "Priority"))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@PercentComplete", System.Data.SqlDbType.Decimal, 9, System.Data.ParameterDirection.Input, False, CType(18, Byte), CType(0, Byte), "PercentComplete", System.Data.DataRowVersion.Current, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_ProjectID", System.Data.SqlDbType.NVarChar, 12, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ProjectID", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_ExpectedEndDate", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ExpectedEndDate", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_PercentComplete", System.Data.SqlDbType.Decimal, 9, System.Data.ParameterDirection.Input, False, CType(18, Byte), CType(0, Byte), "PercentComplete", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_Priority", System.Data.SqlDbType.NVarChar, 10, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Priority", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_ProjectAssignedto", System.Data.SqlDbType.NVarChar, 15, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ProjectAssignedto", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_ProjectDescription", System.Data.SqlDbType.NVarChar, 500, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ProjectDescription", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_ProjectStatus", System.Data.SqlDbType.NVarChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ProjectStatus", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_ProjectTitle", System.Data.SqlDbType.NVarChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ProjectTitle", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_StartDate", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "StartDate", System.Data.DataRowVersion.Original, Nothing))
'
'SqlDeleteCommand1
'
Me.SqlDeleteCommand1.CommandText = "DELETE FROM tblProjects WHERE (ProjectID = @Original_ProjectID) AND (ExpectedEndD" & _
"ate = @Original_ExpectedEndDate OR @Original_ExpectedEndDate IS NULL AND Expecte" & _
"dEndDate IS NULL) AND (PercentComplete = @Original_PercentComplete OR @Original_" & _
"PercentComplete IS NULL AND PercentComplete IS NULL) AND (Priority = @Original_P" & _
"riority OR @Original_Priority IS NULL AND Priority IS NULL) AND (ProjectAssigned" & _
"to = @Original_ProjectAssignedto OR @Original_ProjectAssignedto IS NULL AND Proj" & _
"ectAssignedto IS NULL) AND (ProjectDescription = @Original_ProjectDescription OR" & _
" @Original_ProjectDescription IS NULL AND ProjectDescription IS NULL) AND (Proje" & _
"ctStatus = @Original_ProjectStatus OR @Original_ProjectStatus IS NULL AND Projec" & _
"tStatus IS NULL) AND (ProjectTitle = @Original_ProjectTitle OR @Original_Project" & _
"Title IS NULL AND ProjectTitle IS NULL) AND (StartDate = @Original_StartDate OR " & _
"@Original_StartDate IS NULL AND StartDate IS NULL)"
Me.SqlDeleteCommand1.Connection = Me.SqlConnection1
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_ProjectID", System.Data.SqlDbType.NVarChar, 12, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ProjectID", System.Data.DataRowVersion.Original, Nothing))
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_ExpectedEndDate", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ExpectedEndDate", System.Data.DataRowVersion.Original, Nothing))
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_PercentComplete", System.Data.SqlDbType.Decimal, 9, System.Data.ParameterDirection.Input, False, CType(18, Byte), CType(0, Byte), "PercentComplete", System.Data.DataRowVersion.Original, Nothing))
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_Priority", System.Data.SqlDbType.NVarChar, 10, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Priority", System.Data.DataRowVersion.Original, Nothing))
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_ProjectAssignedto", System.Data.SqlDbType.NVarChar, 15, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ProjectAssignedto", System.Data.DataRowVersion.Original, Nothing))
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_ProjectDescription", System.Data.SqlDbType.NVarChar, 500, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ProjectDescription", System.Data.DataRowVersion.Original, Nothing))
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_ProjectStatus", System.Data.SqlDbType.NVarChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ProjectStatus", System.Data.DataRowVersion.Original, Nothing))
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_ProjectTitle", System.Data.SqlDbType.NVarChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ProjectTitle", System.Data.DataRowVersion.Original, Nothing))
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_StartDate", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "StartDate", System.Data.DataRowVersion.Original, Nothing))
'
'DsProjects1
'
Me.DsProjects1.DataSetName = "dsProjects"
Me.DsProjects1.Locale = New System.Globalization.CultureInfo("en-US")
CType(Me.DsProjects1, System.ComponentModel.ISupportInitialize).EndInit()

End Sub
Protected WithEvents litNoneSelected As System.Web.UI.WebControls.Literal
Protected WithEvents grdProjects As System.Web.UI.WebControls.DataGrid
Protected WithEvents butSelect As System.Web.UI.WebControls.Button

'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim dsProjects As System.Data.DataSet
PJ = Session("Projects")
adptProjects = Session("adptProjects")
adptProjects.Fill(dsProjects)

'SqlDataAdapter1.Fill(DsProjects1)

'Update the datagrid
If Not IsPostBack Then
grdProjects.DataBind()
End If
End Sub

End Class
========================
Now my error message is pasted below:

Server Error in '/ISHelpDeskv1' Application.
--------------------------------------------------------------------------------

Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 161: PJ = Session("Projects")
Line 162: adptProjects = Session("adptProjects")
Line 163: adptProjects.Fill(dsProjects)
Line 164:
Line 165: 'SqlDataAdapter1.Fill(DsProjects1)


Source File: c:\inetpub\wwwroot\ISHelpDeskv1\Summary.aspx.vb Line: 163

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
ISHelpDeskv1.Summary.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\ISHelpDeskv1\Summary.aspx.vb:163
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

I think its somewhere in my declarations...

If you can't make it good, make it look good!
Go to Top of Page

jen
Flowing Fount of Yak Knowledge

Sweden
4110 Posts

Posted - 09/08/2004 :  23:24:58  Show Profile  Send jen a Yahoo! Message
try this for standard logins:

conn= "Provider=sqloledb;Data Source=VNASIBI-3RJ2051;Initial Catalog=NewProjects;User Id=myUsername;Password=myPassword"


quote:
Originally posted by vnasibi

Hey Tara
Here's the conn string:
workstation id="VNASIBI-3RJ2051";packet size=4096;integrated security=SSPI;data source="VNASIBI-3RJ2051";persist security info=False;initial catalog=NewProjects

I created a new SQl DB (newprojects) and a new ASP app, and I'm still getting this error message

If you can't make it good, make it look good!

Go to Top of Page

vnasibi
Starting Member

USA
17 Posts

Posted - 09/09/2004 :  18:55:42  Show Profile
Hey Tara
I read somewhere that suggested my error could be linked to the Windows version I'm running. I'm on Windows XP, previously, when I worked on a Windows 2000 system, I never got this kind of problem.
Any suggestions?
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37143 Posts

Posted - 09/09/2004 :  19:02:58  Show Profile  Visit tkizer's Homepage
XP should not be a problem. I'm running XP on my laptop and don't have any problems connecting to the SQL Server on it. I also connect out to other SQL Servers without any problems.

Tara
Go to Top of Page

vnasibi
Starting Member

USA
17 Posts

Posted - 09/09/2004 :  19:10:31  Show Profile
Do you know anything about ASP.NET Web Matrix? I am thinking of resorting to that right now!

If you can't make it good, make it look good!
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37143 Posts

Posted - 09/09/2004 :  19:16:08  Show Profile  Visit tkizer's Homepage
No I do not.

Tara
Go to Top of Page

vnasibi
Starting Member

USA
17 Posts

Posted - 09/09/2004 :  19:17:54  Show Profile
Thanks. I'll look into that and see what comes up.

If you can't make it good, make it look good!
Go to Top of Page

vnasibi
Starting Member

USA
17 Posts

Posted - 09/15/2004 :  12:39:38  Show Profile
Hey Tara
I've been racking my brains over and over on this topic. I think I am getting access to the database now using my connection string, but, it is returning a null value on my dataset. I have declared my sqlconnection, dataadapter and dataset OUTSIDE of the Page_Load control and I'm just referencing the dataset within the Page_Load event. Here's the full error message pasted below:


Server Error in '/ISHelpDeskv1' Application.
--------------------------------------------------------------------------------

Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 6: Inherits System.Web.UI.Page
Line 7: 'Dim PJ As SqlConnection = Session("sqlconnection1")
Line 8: Dim PJ As SqlConnection = System.Web.HttpContext.Current.Session("sqlConnection1")
Line 9: Dim adptProjects As SqlDataAdapter
Line 10:


Source File: c:\inetpub\wwwroot\ISHelpDeskv1\Summary.aspx.vb Line: 8

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
ISHelpDeskv1.Summary..ctor() in c:\inetpub\wwwroot\ISHelpDeskv1\Summary.aspx.vb:8
ASP.Summary_aspx..ctor()

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) +0
System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
System.Web.UI.TemplateControlParser.GetCompiledInstance(String virtualPath, String inputFile, HttpContext context) +164

[HttpException (0x80004005): Failed to create page of type 'ASP.Summary_aspx'.]
System.Web.UI.TemplateControlParser.GetCompiledInstance(String virtualPath, String inputFile, HttpContext context) +338
System.Web.UI.PageParser.GetCompiledPageInstanceInternal(String virtualPath, String inputFile, HttpContext context) +43
System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String path) +44
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, String path, String pathTranslated, Boolean useAppConfig) +699
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +95
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +173

Please assist! Sorry for bugging you!

If you can't make it good, make it look good!
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37143 Posts

Posted - 09/15/2004 :  12:42:38  Show Profile  Visit tkizer's Homepage
That's not a SQL error, so I can't help you. You might try the forums over at www.asp.net.

Tara
Go to Top of Page

vnasibi
Starting Member

USA
17 Posts

Posted - 09/15/2004 :  12:43:59  Show Profile
Thanks...

If you can't make it good, make it look good!
Go to Top of Page

vnasibi
Starting Member

USA
17 Posts

Posted - 09/16/2004 :  13:00:26  Show Profile
hey Tara.
Really sorry for bugging you yet again. From Microsoft.com help desk, I was informed that if I had SQL running on my machine prior to installing VB.NET, then some ASP.NET components may be missing. I was adviced to uninstall SQL Server form my machine and reinstall it. I did that, restarted my machine (to be sure) and the MSSQL Server applet was running. I tried running a simple query on query analyzer, and it run OK. Checked in Control Panel - Add/Remove programs, SQL Server was no longer on the list, yet I could still run queries. How is this even possible? I am beginning to think that maybe I've been running client components on my machine all along and I never had Server components running on my machine in the first place! Any ideas?
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.21 seconds. Powered By: Snitz Forums 2000