.net, .mdb, and the framework

I am a consultant and I have commissioned work from a programmer I have hired, the software is written in .net for Windows and is not web based.

The problem we are having is causing us to pull our hair out. The problem is this:

On the developers WinXP machine with 03 visual studio the application he wrote works phenomenally well.

On my machine Win2K no visual studio the application he wrote works phenomenally well.

The unfortunate problem is that the CLIENT has installed the same application multiple times (XP SP1 and SP2) and is consistently getting the table display errors, either to do with the database access or something to do with the draw routine. He has installed .NET framework 1.1 from MSFT multiple times but its always a no go. I even went out to his office, uninstalled the .net framework 1.1, restarted, installed the framework, restarted and installed the app, same error.

Error reads:
---
An unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will be shut down immediately.

Cannot find column 2.

---

On Continue, all of the tables in the view show up a red Xs, rendering the app inoperable (that's the program, using those tables). We have since tried the app on a third machine running Windows XP with no special modifications and the app worked fine on the first try.

At this point I am suspecting it either has something to do with the database access or the drawing table libraries on those particular machines (2 out of 5 machines tried). I can't imagine anything other than the .net framework that would fix it, but after several reinstalls we're still banging our head against the wall.

The app works on the client's Win2K machine but this is corporate controlled and the office version of 2000 is insufficient, our outputs are using Excel 2003, and we have no control over those machines, they are locked down - so the final reporting does not work on that machine. At least the client can see that we're not snowing him that it actually works!

Anyone have any ideas I searched for any software that might conflict but I could find none. I'm thinking a wildcard is that it may have to do with the IE security zone settings but this shouldn't make any sense. The only thing the two bad apples have in common is that they dont have internet access; but the app doesnt use internet access at all, it just opens an MDB, inline edits the MDB and passes off variables to certain cells in an Excel sheet.

Halp! We want to get paid!





Answer this question

.net, .mdb, and the framework

  • PremZ

    You don't need Access, I do believe that you need MDAC.



  • Jessica Alba

    We have recreated the error and it appears to be a broken DB connection (renaming the database causes the same error to occur on a machine on which the software works). I will have my programmer either post the answer to your question regarding the connection or he will forward it to me. I will update if the issue is resolved.


  • James_Steven

  • Alvedon

    Ok one other thing; possibly related, you MVPs may find it handy.

    Upon an upgrade to Maximizer 9 (Std) from Maximizer 8 a string of OLE and ODBC error has occurred on these machines that it doesnt work on. The error occurs when trying to use the function to include a file from the filesystem into the database. It returns an OLE /ODBC error. Multiactive/Maximizer tech support said they could not replicate the problem, however it occurred on 7 corporate machines running Win2K and 4 laptops, including these.

    I know you guys are probably not Maximizer experts, but do you have hunches that these two issues could be related It seems somewhat of a coincidence.


  • hrubesh

    We use OLEDB to make the connection. I believe the problem is caused by MDAC. I try to rename the mdb, and run the .Net application. I got an error message saying the mdb was not found, and if I click the continue button, all the datagrids were displayed with a BIG RED X.
  • GeneticCr


    I think we need a bit more detail information. For example, what is it that you are using to display what you refer to as a "view" How are you making the connection to the Access database Jet OLEDB ODBC

    I don't recognize the "cannot find column 2" error. If there was more information, perhaps from a stack trace, it might be easier to determine how it is being generated. I don't know what the red Xs are so it would definitely help to know what component is responsible for the display of the data.



  • doctorx0079

    So the MDAC did cure the issues with not displaying the tables... The red X is gone

    But the "column 2" error persists.

    Luckily I have had the client clip the exact error. Below

    -------------------

    ************** Exception Text **************

    System.IndexOutOfRangeException: Cannot find column 2.

    at System.Data.DataColumnCollection.get_Item(Int32 index)

    at CIBCInvestPortfolio.frmMain.InitDGAccount()

    at CIBCInvestPortfolio.frmMain.Form1_Load(Object sender, EventArgs e)

    at System.Windows.Forms.Form.OnLoad(EventArgs e)

    at System.Windows.Forms.Form.OnCreateControl()

    at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

    at System.Windows.Forms.Control.CreateControl()

    at System.Windows.Forms.Control.WmShowWindow(Message& m)

    at System.Windows.Forms.Control.WndProc(Message& m)

    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

    at System.Windows.Forms.ContainerControl.WndProc(Message& m)

    at System.Windows.Forms.Form.WmShowWindow(Message& m)

    at System.Windows.Forms.Form.WndProc(Message& m)

    at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)

    at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)

    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    ************** Loaded Assemblies **************

    mscorlib

    Assembly Version: 1.0.5000.0

    Win32 Version: 1.1.4322.573

    CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll

    ----------------------------------------

    PortfolioSystem

    Assembly Version: 1.0.2353.37085

    Win32 Version: 1.0.2353.37085

    CodeBase: file:///C:/Program%20Files/computerology%20consulting/Portfolio%20System/PortfolioSystem.exe

    ----------------------------------------

    System.Windows.Forms

    Assembly Version: 1.0.5000.0

    Win32 Version: 1.1.4322.573

    CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll

    ----------------------------------------

    System

    Assembly Version: 1.0.5000.0

    Win32 Version: 1.1.4322.573

    CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll

    ----------------------------------------

    System.Drawing

    Assembly Version: 1.0.5000.0

    Win32 Version: 1.1.4322.573

    CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll

    ----------------------------------------

    System.Xml

    Assembly Version: 1.0.5000.0

    Win32 Version: 1.1.4322.573

    CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll

    ----------------------------------------

    Accessibility

    Assembly Version: 1.0.5000.0

    Win32 Version: 1.1.4322.573

    CodeBase: file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll

    ----------------------------------------

    System.Data

    Assembly Version: 1.0.5000.0

    Win32 Version: 1.1.4322.573




  • ONEWORKNGRL

    The client has Excel 2003 installed, but did not install Access. As far as I'm aware you dont need to be running Access in order to have .net call an mdb

    correct me if I am wrong


  • Imran Shaikh

    You don't need Access installed to use an Access db, However if a different version of Access is installed on the machine it can cause conflicts.

  • Mike36

    I don't even know what Maximiser is, but it sure sounds like some sort of database driver is not up to date on these machines.



  • George Waters

    Good suggestion cgraus!

    Also make sure all of your Access and Excel versions are the same



  • tattoo

    Thanks Paul,

    We will take a look at this. For clarity, OLEDB is not only for Jet, is it


  • Jonas Beckeman


    Correct. OLEDB database technology was born out of COM ADO and there are many OLEDB database providers. MDAC includes the COM ADO distribution, but not the Jet OLEDB provider distribution. ADO.NET is not based upon COM but does provide a native .NET OLEDB library for interfacing with OLEDB database providers (which appears to be the implementation you have).

  • SuperNova298


    Jet OLEDB and MDAC are really two separate issues. However you could try a repair to see if it fixes anything. I would also upgrade to the latest version of Jet as well.

    http://www.macropool.com/en/download/mdac_xp_sp2.html

    I would also try compacting the Access database just to make sure there isn't any corruption.



  • .net, .mdb, and the framework