.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

"Object reference not set to an instance of an object" error occurs when trying to edit or open a na

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :Sql Server

I'm going through the MS SQL Server SSIS Step by Step book from Microsoft Press and I think I have an issue with my install of MS SQL Server.  On the first exercise, the book instructs you to open an existing project and then open a data source view from the project.  The data source view contains several table objects and a named query object.  When I right-click on the named query object and then choose 'Edit Named Query .', I get a pair of 'Object reference not set to an instance of an object' errors.  This also happens if I double-click on the object itself.


I created a blank project.  Then I created a Data Source View and populated it with tables from an existing database using the wizard.  When I tried to add a new named query I got the same error.


Is there a configuration error here?  So far all of the other functions have worked normally.


SQL Server 2005 Developer - SP2 (all patches applied) (SQL Server 2005 Evaluation exhibits the same error)


View Complete Post

More Related Resource Links

Open PopUp Window From Error httpModule


I would like to open a popup window from the assembly to present the information to the user. Does anyone know if this is possible, I am presently doing the following:

        WriteLine("body {font-family:""Verdana"";font-weight:normal;font-size: .7em;color:black; background-color:white;}")
        WriteLine("b {font-family:""Verdana"";font-weight:bold;color:black;margin-top: -5px}")
        WriteLine("H1 { font-family:""Verdana"";font-weight:normal;font-size:18pt;color:red }")
        WriteLine("H2 { font-family:""Verdana"";font-weight:normal;font-size:14pt;color:maroon }")
        WriteLine("pre {font-family:""Lucida Console"";font-size: .9em}")

Error Message when trying to open crystal report


Logon failed. Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "DATA" requested by the login. The login failed. Error in File C:\Windows\TEMP\NewQuote {573CE511-64B7-4161-B9DF-0E58EB1EDA19}.rpt: Unable to connect: incorrect log on parameters.

I get the above message when loading the crystal report from the Intranet via IIS but it works fine from the localhost the report loads ok and picks up my parameters.  This is my Code behind Page.

Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load

        Dim Count As Int32
        Count = Int32.Parse(Label1.Text)

        Dim ConnInfo As New ConnectionInfo
        With ConnInfo
            .ServerName = "\\Server1\Sqlexpress"
            .DatabaseName = "DATA"
            .UserID = "sa"
            .Password = "1181

Moved from WinXP to Win7 - don't see choice to open file in read only or edit mode


I just recently moved from Win XP Pro SP3 to Win 7 32-bit Pro. I am logging into domain X normally. Our Sharepoint 2007 server authenticates only on domain Y. So I start Internet Explorer with "run as different user" and provide my domain Y credentials. All fine. 

In win XP, after I did this, when I click on an Excel file on Sharepoint, I would get a dialog asking if I wanted to check out and edit or open as read only. 

In win7, I don't get that choice. The file simply opens, and I get a bar at the top which allows me to check out the file if I wanted to. 

How can I restore the functionality I used to have, with the dialog for checking out the file before opening it?

Error: Do you want to save this file, or find a program online to open it?



I am relatively new to MVC , i am getting the following error when i try to browse to a page in which i have used usercontrol and within the usercontrol i have a simple grid.

Error: Do you want to save this file, or find a program online to open it?

I am returning the data from the controller like this

 var jsonData = new
                    total = 1,
                    page = 1,
                    records = myRequests.Count,
                    rows = new[]{myRequests.ToArray()                 

File open error in grid



I am using gridview control which has the option to open the file like jpg,pdf etc. The grid is under UpdatePanel template.When i try to open the file in seperate window by using the below code

If (e.CommandName = "Open") Then 

Dim path = e.CommandArgument  

Dim strNewURL As String = "<Script Language = 'JavaScript'>window.open('www.google.com')</Script>"



i am getting following error:

"Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by

Error "The process cannot access the file ....." occurs while using function "ExportToStream"


Dear all,

   I sometimes get the following error while printing crystal report to pdf:

   System.Runtime.InteropServices.COMException (0x80004005): The process cannot access the file because
it is being used by another process. at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export
(ExportOptions pExportOptions, RequestContext pRequestContext) at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream
(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
 at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options) at
 CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType) at
 CommonWA.CommonFunc.GetPDFMemoryStream(DCMSReportDoc _dcmsreportdoc, Boolean& _DataExist) in E:\wwwroot\ASPWA\CommonWA\CommonCom.vb:line 382

  The error not occurs frequently but sometimes it will happen, can someone tell me why the error occurs and how can I solve the problem?

Thank you very much.


LINK : fatal error LNK1104: cannot open file 'libirc.lib'

I am trying to build my project for 64 bit windows on a 32 bit windows machine. I am getting a linking error of the kind 15>LINK : fatal error LNK1104: cannot open file 'libirc.lib' Can someone tell me the resolution for this problem?

Unable to open physical file - Operating system error 5: 5(error not found) Microsoft SQL Server: Er

I am trying to attach a database to SQL 2005. This database has not previously been attached. I have only just installed SQL.   I get the following message: Unable to open physical file "C:\ArrowSQL\Arr@Data\Arrow_data.mdf" Operating system error 5: "5(error not found)" (Microsoft SQL Server: Error 5120)".   I have loaded SQL and the database fiel and directory with the same user acccount which is a local adminstrator ont hsi machine. I have checked that I have read/write access to the file.   The machine runs Windows Vista Business. SQL has SP 2 loaded.   What causes this?

Error trying to open WPF Xaml windows from Visual Studio 2010 in Blend 4

Hi I have Visual Studio 2010 ultimate, and expression Blend 4. I have created a WPF 4 project in Visual Studio and when i try to open the MainWindow.xaml file in Expression Blend 4 - i get an error stating that the file or folder is not a valid blend project. Is there something i need to install for visual studio to make blend able to edit WPF Xaml files in Blend 4? I can open blend4 and create WPF applications with no problem - its just trying to open a mainwindow.xaml created in Visual Studio 2010 in blend 4 when i get the error. I am running windows 7 32 bit. Cheers Rod. Mono / DotNet Rocks!

File not found error when trying to open site permissions on a blog site

We have created a simple team site and a block subsite.  When trying to edit the site permissions we see the following error.  Any ideas? When opening a blog site and clicking Site Actions - site permissions we received a new page with the following error: Error File Not Found Troubleshoot issue with Microsoft Sharepoint Foundation Correlation ID: 51b54786-f344-4474-b88e-3080c363693 Date and Time: 3/24/2010 3:03:38 PM

Powerpoint ppsx files open as read only in sharepoint with not option to edit

With Powerpoint 20007 in sharepoint(MOSS 2007) the PPSX files are opening in read only mode with no option to edit to be found. 2nd issue is ppsx files do not open on any persons computer as a show.  Is it possible to change this? How do I change this so I can edit the slides? Current "bad" solution is to save to local drive than upload them over the location  on sharepoint. This post was redirected by moderator from: http://social.answers.microsoft.com/Forums/en-US/pptshare/thread/9674b463-2195-4bbd-a2e7-526b8cfa4491

Gridview Edit Error

I have a gridview that gets an error when clicking the Edit button on every other row.  the error is "Conversion from string "" to type date is not valide".  Here is the code: Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound Dim current As Date = Date.Now Dim future As Date = Date.Now.AddDays(7) If e.Row.RowState <> DataControlRowState.Edit Then If e.Row.RowType = DataControlRowType.DataRow Then If CDate(e.Row.Cells(3).Text) <= current Then e.Row.BackColor = System.Drawing.Color.Red ElseIf CDate(e.Row.Cells(3).Text) > current And CDate(e.Row.Cells(3).Text) < future Then e.Row.BackColor = System.Drawing.Color.Yellow ' Else : e.Row.BackColor = System.Drawing.Color.White End If End If End If End Sub <asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False" CellPadding="9" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="Horizontal" DataKeyNames="idx" Font-Size="Small" Width=&q

Object reference not set to an instance of an object error.

i've installed the VSeWSS.msi on VS 2005, i'm using SPS 2007, i'm developing on my workstation in C#, i've added the Mircosoft.Sharepointserver dll reference to my project but i still can't deploy a very basic webpart. i get the "Object reference not set to an instance of an object" error but there's no reference to a line, column, project or anyhting. very frustrating. any suggestions/links whould be appreciated.

Login error - Object reference not set to an instance of an object.

Hi all,I've set up the login section as a user control. WheneverI log in I get a "Object reference not set to an instance of an object", with the code stopping on this line: if (Membership.ValidateUser(txtUserName.Text,txtPassword.Text))Can anyone tell me how to fix this please?protected void LoginButton_Click(object sender, EventArgs e) { TextBox txtUserName = loggedin.FindControl("UserName") as TextBox; TextBox txtPassword = loggedin.FindControl("Password") as TextBox; CheckBox ckbRememberMe = loggedin.FindControl("RememberMe") as CheckBox; if (Membership.ValidateUser(txtUserName.Text,txtPassword.Text)) { FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, ckbRememberMe.Checked); } else { // Msg.Text = "Login failed. Please check your user name and password and try again."; } } <asp:LoginView ID="loggedin" runat="server"> <AnonymousTemplate> <asp:Login ID="Login1" runat="server"> <LayoutTemplate> <table id="mainbox" width="400"> <tr> <td width="150" class="label">

BIDS wont let me edit script tasks, Package wont open without a "temp" folder in appdata???

I have a very stupid problem, because the way BIDS works is just hilariousy idiotic.    Short Story: 1) When i try to edit script tasks it will complain about "failed to create project at some random path in temp folder" and wont open anything. I cannot edit script tasks anymore. THe project is essentialy dead to me. REboot or restart wont help. I spent five hours on this project and i dont want to do all that work from scratch! 2) I cannot port my solution to antoher computer or place because it links to the files in appdata/local/temp folder of the pc for some reason. If i delete that folder or port the solution, it will complain about some file in temp folder called "3jews....tmp" and will say that solution is unopenable. Need help to resuce my project and be able to continue working on it!   Long Story: When you make a project, BIDS stores its files in a separate folder: a solution file, a project file, a package file etc. You might have thought, you can now carry your solution over by copying this folder. WRONG! The BIDS actually stores files of  the solution in /Users/name/AppData/Local/Temp folder! And It cannot open a solution/package/project without files from that folder, now what kind of idiotism is that?   It all started with BIDS not saving my script task changes, then telling me "cannot create project in folder

Error while export to pdf-Object reference not set to an instance of an object

Hello, I am getting error while rendering the report to pdf in SSRS 2008. This is happening randomly and sometimes I get this error. I have SQL Server 2008 SP1 installed in my system . I installed the cumulative update 1 for SP1 also but no luck. Every time when export to pdf fails, SSRS is creating the dump file in the logs. I have captured the log of this specific error. Please let me know if you have any idea about this.   reportrendering!ReportServer_0-297!1ec4!03/30/2010-10:32:57:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException: An error occurred during rendering of the report., ; Info: Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.OnDemandReportRendering.ReportRenderingException: An error occurred during rendering of the report. ---> System.NullReferenceException: Object reference not set to an instance of an object.   at Microsoft.ReportingServices.Rendering.HPBProcessing.Paragraph.get_SpaceBefore()   at Microsoft.ReportingServices.Rendering.RichText.LineBreaker.FlowParagraph(Paragraph paragraph, Directions direction, IntPtr hdc, Single dpiX, FontCache fontCache, FlowContext flowContext, Boolean keepLines, SizeF flowContextSize, Int32& contentOffset)   at Mi

Help with Object reference not set to an instance of an object. error.

I was given a chunk of code to help with accessing dynamic forum controls about a week back and when I implemented the code I get the error "Object reference not set to an instance of an object". I asked in the thread the code was given but have not recived an answer yet (asked about 4 days ago) and I think that is beause  the thread is marked as resolved. The line of code  causing the error is   if(t.Equals(this.ddlAmountToAdd.ClientID)&&!string.IsNullOrEmpty(v))    And here is the full code for the c# .Net 4 page.using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class GameInformation_AddUpcomingRelease : System.Web.UI.Page { public string[] Regions = { "USA", "Japan", "Europe", "Other" }; //Create a string array of regions. public string[] Platforms = { "PlayStation 3", "X-Box 360", "Wii", "Computer", "PSP", "Other" }; //Create a string array of platforms. protected void Page_Load(object sender, EventArgs e) { ddlPlatform1.DataSource = Platforms; ddlPlatform1.DataBind(); ddlRegion1.DataSource = Regions; ddlRegion1.DataBind(); } protected override void OnInit(EventArgs e)
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend