Access Database Connection/Query Problem: "Object reference not set to an instance of an object"

Angry I have been working on a web site in Visual Web Developer for several months.  For no apparent reason, I can no longer create, modify, or connect to my Microsoft Access database source.  The database is still where it has always been, still opens, etc.  Below are a few of the symptoms.  Does anyone know what would cause this and more importantly how I can fix it?

(1) I can no longer use the "Query Builder" with existing or new aspx pages; when I try I get this message: "Object reference not set to an instance of an object"

(2) I tried using the "Design Custom Statements or Stored Procedures" tools and as soon as I try to test the query I get these messages: "Could Not Create Connection"     "Object reference not set to an instance of an object"

I have tried "repairing" Visual Web Developer (essentially reinstalling) but it did not fix the problem.

 Desperately need help.

 

0
dinofan
4/7/2007 9:15:29 PM
asp.net.web-dev-2005-express 3977 articles. 0 followers. Follow

4 Replies
733 Views

Similar Articles

[PageSpeed] 46

Does the web site still run OK? I mean do the pages connect to the database without problem? Is it just the VWD tools that blow up?

Regards Mike
[MVP - ASP/ASP.NET]
My site
0
Mikesdotnetting
4/7/2007 9:32:45 PM
Yes, what I have developed already runs fine. All works as expected.  It is just that I can no longer create new aspx pages nor edit existing ones.
0
dinofan
4/7/2007 9:39:55 PM
My response was a bit muttled.  The answer to the question, "Does the web site still run OK? I mean do the pages connect to the database without problem? Is it just the VWD tools that blow up?", is the VWD tools are not working.
0
dinofan
4/7/2007 10:11:47 PM

I tried everything under the sun to fix this issue. Nothing worked. For an unrelated reason, I upgraded by hard disk and manually installed all of my software (as opposed to transferring the data/applications) in hopes that if something was corrupt; it would not be copied over.  That did the trick.  I downloaded Visual Web Developer and it now works. I am assuming files and/or settings were either corrupted or incorrectly set. 

Microsoft applications already take a large bite out of my budget and I like "free" stuff (Visual Web Developer ) but I think Microsoft should provide some level of technical support even if it is fee based as no one in these forums had a solution to this type of problem.

0
dinofan
5/1/2007 4:09:08 PM
Reply:

Similar Artilces:

Silly question: How do I connect to an ACCESS database with out getting the "object reference not set to an instance of an object" message?
1. Created folder App_Data 2. Add mdb file 3. Drag AccessDataSource control to form. 4. Map to the mdb file. 5. Build query and get "object reference not set to an instance of an object" error. What am I missing? I had no trouble connecting to SQL Server 2005 on the server, but the local mdb file??? Thanks, Bill    at what code, or exactly where are you getting the error message?David WierMCP/ASPInsiderASPNet101.com - where to look first!Control Grouper - easily control properties for multiple controls with one control!Calendar Express - The Best HTML Calendar Generator ...

Httpcontext.Current.Session["foo"]="foo" results in "Object reference not set to an instance of an object"
I tried to set a session variable in a App_Code class:  Httpcontext.Current.Session["foo"]="foo"; but I keep getting "Object reference not set to an instance of an object" error. How can I access Session object in a class file which is not part of a .aspx file? You are using c# right? System.Web.HttpContext.Current.Session["foo"] = "foo"; //for c#System.Web.HttpContext.Current.Session("foo") = "foo"; //for vb Your syntax is correct for setting a session variable inside a class file. Is session enabled for y...

"Object reference not set to an instance of an object. " and connection string
Hi, I am deploying my web through a web hosting services which provides SQL database support. I got following errors whenever I try to open my webpage,which never happen when I run my web on the local machine.  I have my connection string configured in my web.config as below: <add name="ArtHouseConnection" connectionString="Server=serveripaddress; Integrated Security=True; Database=arteh3_database;User Id=username;Password=password;" providerName="System.Data.SqlClient"/> <add name="ASPNETDBConnectionString1" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|...

Problem Using an AccessDataSource. "Object reference not set to an instance of an object"
I am very new to ASP.NET. Currently I am using Visual Web Developer 2008. I want to use a grid control, but I can't seem to get off square one. My problem is that when I add an AccessDataSource to my Web Form and try to configure it I run into a problem. These are the steps I am taking, and the issues I encounter: 1. Drop an AccessDataSource onto my Web Form2. Click "Configure Data Source" on its smart tag3. Select the Access database within the App_Data folder4. Click "Next" Now, rather than advancing to the "Configure the Select Statement" dialog i...

"Object reference not set to an instance of an object" can any one help me with this problem???
I have got a runtime error when i am trying to loop a table's rows inside of the dataset, can anyone help me?? here is part of the source code: OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source = e:\Data_File\userDB.mdb"); OleDbCommand comd = new OleDbCommand(); comd.CommandText = "SELECT db_Username FROM [User_Table]"; comd.Connection = conn; OleDbDataAdapter da = new OleDbDataAdapter(); da.SelectCommand = comd; conn.Open(); DataSet ds = new DataSet(); da.Fill(ds); bool...

Getting an "Object reference not set to an instance of an object", and no idea which object
I'm working on one of our ASP.NET 2005 projects now.  For the longest time we've gotten an error when compiling it that says, "Object reference not set to an instance of an object".  However, the irritating thing is it doesn't say what "object" its having problems with, and it certainly isn't telling me which file that has the problem.  So, I'm getting this error message that doesn't tell me where the error comes from.  All I know is that the error is "Out there".  Reminds me of an old X-Files episode. How am I t...

What does "Object reference not set to an instance of an object" mean in this instance?
I get this err msg: "Object reference not set to an instance of an object. Line 317:      con.Open();Line 318:      sTypeCode = command.ExecuteScalar().ToString();" Here is the greater context:     public string GetUnitTypeCodeForSerialNum( string ASerialNumber )    {      string sTypeCode;      SqlConnection con = new SqlConnection(        ConfigurationManager.ConnectionStrings[      &...

error "Object reference not set to an instance of an object" when adding a new web form
hiya, i get the error "Object reference not set to an instance of an object" when adding a new web form to a web site this is what i am doing i launch vs 2005 beta 2 i create a new web site on the solutions explorer, i right click on the site and select "add new item" i select "web form" on the dialog box, and click "add" and that's when i get the error any ideas? f...

Problem opening a file using StreamReader: "Object reference not set to an instance of an object"
Hi folks,I'm trying to read from a file using StreamReader, but for some reason can't open the file. The path and filename are correct, but this is the error I get: "Object reference not set to an instance of an object"Here's the relevant part of the code: Try myStreamReader = File.OpenText(configFileName) myInputString = myStreamReader.ReadLine() While Not myInputString Is Nothing tag(rowCount) = myInputString + vbCrLf rowCount += 1 myInputString = myStreamReader.ReadLine() End While Catch exc As Exception MsgBox("File could not be opened or read." + vbCrLf + _ "Please verify tha...

Using "New" for "Object reference not set to an instance of an object" error doesn't work...
Hi, I'm trying to build a sql insert statement by reading through each textbox the footer of a DataGrid control. Here's my datagrid code:<asp:DataGrid ID="Datagrid1" runat="server" OnPageIndexChanged="dgPersonnelType_PageChanger" AutoGenerateColumns="False" CellPadding="4" AlternatingItemStyle-BackColor="#FFFFBB" AllowPaging="True" PageSize="20" ShowFooter="True"> <ItemStyle BackColor="WhiteSmoke" Font-Names="verdana" Font-Size="10px" /> <Columns> <asp:TemplateColumn HeaderText="Insert"> <HeaderStyle BackColor="#CCCC99" Font-Bold="true" ...

Turning Tracing on in web.config causes an "Object reference not set to an instance of an object." error
OK so I am having a problem where in one of my larger projects, if I add the following tag inside the <system.web> tag in my web.config I get an error (I have included the error and the web.config below).<trace enabled="true" pageOutput="true" />I can add the above line to a brand new web app and no problem.  It outputs the trace information to the screen.  Does someone have an idea what the problem may be?In my larger project I get the following:Server Error in '/Application/aCityMap' Application. Object reference not set to an instance of a...

Getting "object reference not set to an instance of an object" on databind when it IS an instance
Hey there;  I've been having this bizarre problem for over a year now, and I've been trying to work around it up until now (to the point where it has just driven me crazy).I have a collection of about 80 objects that I keep in the Application object.  The page runs fine, but every once in a while (I have never been able to isolate what triggers it, it seems to occurr after hours and hours of operation at random intervals), the app simply starts choking with an "Object reference not set to an instance of an object" error on the Databind statement.  It doe...

"object reference not set to an instance of an object"
when I add table to a datagrid visual web developer gives an error that says "object reference not set to an instance of an object" E.TAYLAN Bummer.  How about the full error message and possibly some code snippets so we can help you track this down? JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue....

"Object reference not set to an instance of an object."
What's wrong with this code? If Request.Cookies("NoteSaver")(Subject.Text) = "" Then It shows the error: 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. I don't understand why it shows it. Thanks O.o If there is no "NoteSaver" cookie, ...

Web resources about - Access Database Connection/Query Problem: "Object reference not set to an instance of an object" - asp.net.web-dev-2005-express

Resources last updated: 11/24/2015 10:20:50 AM