473,666 Members | 2,480 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# Win App DB problem, ... on remote machine only

pod
298 Contributor
Hello

My OS is Windows2000

I am new to .NET

I developed a C# Windows Application that connects to a MS Access database on the network using proper UNC format.

It works perfectly on my main machine (from which I have developed it).

Then I published it to the same location where the database is located on the network. Again the application works perfectly from my main machine.

I logged in onto another machine with the same profile, I go the published location, click the setup.exe file and then I get the .NET Framework Error popup displaying error information about the application having a problem finding table 0.

When I click continue on the error popup, the application portion that has nothing to do with the database is working perfectly, but the combobox that is supposed to be filled with a recordset, is empty.

I tried publishing it using both options "Available Online only" and "Online/Offline"

For debugging purposes, I have removed any connection strings to my machine , here's my config file:
Expand|Select|Wrap|Line Numbers
  1. <configuration>
  2.   <appSettings>
  3.     <add key="connStringDEV" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\echqw2ks04\Public\Office Search\_EC Tool\testdb\database\DB_OVR_Tracking.mdb" />
  4.     <add key="connStringPRO" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\echqw2ks04\Public\Office Search\_EC Tool\testdb\database\DB_OVR_Tracking.mdb" />
  5.   </appSettings>
  6.   <system.windows.forms jitDebugging="true" />
  7. </configuration>
  8.  
Here's the error message:
Expand|Select|Wrap|Line Numbers
  1. ************** Exception Text **************
  2. System.IndexOutOfRangeException: Cannot find table 0.
  3.    at System.Data.DataTableCollection.get_Item(Int32 index)
  4.    at Tracking_WIN.OVRform.load_OVRform()
  5.    at Tracking_WIN.OVRform.OVRform_Load(Object sender, EventArgs e)
  6.    at System.Windows.Forms.Form.OnLoad(EventArgs e)
  7.    at System.Windows.Forms.Form.OnCreateControl()
  8.    at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
  9.    at System.Windows.Forms.Control.CreateControl()
  10.    at System.Windows.Forms.Control.WmShowWindow(Message& m)
  11.    at System.Windows.Forms.Control.WndProc(Message& m)
  12.    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
  13.    at System.Windows.Forms.ContainerControl.WndProc(Message& m)
  14.    at System.Windows.Forms.Form.WmShowWindow(Message& m)
  15.    at System.Windows.Forms.Form.WndProc(Message& m)
  16.    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  17.    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  18.    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  19.  
  20.  
  21. ************** Loaded Assemblies **************
  22. mscorlib
  23.     Assembly Version: 2.0.0.0
  24.     Win32 Version: 2.0.50727.832 (QFE.050727-8300)
  25.     CodeBase: file:///C:/WINNT/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
  26. ----------------------------------------
  27. Tracking_WIN
  28.     Assembly Version: 1.0.0.0
  29.     Win32 Version: 1.0.0.0
  30.     CodeBase: file:///C:/Documents%20and%20Settings/pdorion/Local%20Settings/Apps/2.0/7GP2JMTR.G4B/8X8N69TN.12Z/trac..tion_f76f81ac2debb27c_0001.0000_21eca0aa59181f35/Tracking_WIN.exe
  31. ----------------------------------------
  32. System.Windows.Forms
  33.     Assembly Version: 2.0.0.0
  34.     Win32 Version: 2.0.50727.832 (QFE.050727-8300)
  35.     CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
  36. ----------------------------------------
  37. System
  38.     Assembly Version: 2.0.0.0
  39.     Win32 Version: 2.0.50727.832 (QFE.050727-8300)
  40.     CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
  41. ----------------------------------------
  42. System.Drawing
  43.     Assembly Version: 2.0.0.0
  44.     Win32 Version: 2.0.50727.832 (QFE.050727-8300)
  45.     CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
  46. ----------------------------------------
  47. winDBtools
  48.     Assembly Version: 1.0.0.0
  49.     Win32 Version: 1.0.0.0
  50.     CodeBase: file:///C:/Documents%20and%20Settings/pdorion/Local%20Settings/Apps/2.0/7GP2JMTR.G4B/8X8N69TN.12Z/trac..tion_f76f81ac2debb27c_0001.0000_21eca0aa59181f35/winDBtools.DLL
  51. ----------------------------------------
  52. System.Data
  53.     Assembly Version: 2.0.0.0
  54.     Win32 Version: 2.0.50727.832 (QFE.050727-8300)
  55.     CodeBase: file:///C:/WINNT/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
  56. ----------------------------------------
  57. System.Xml
  58.     Assembly Version: 2.0.0.0
  59.     Win32 Version: 2.0.50727.832 (QFE.050727-8300)
  60.     CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
  61. ----------------------------------------
  62. System.Configuration
  63.     Assembly Version: 2.0.0.0
  64.     Win32 Version: 2.0.50727.832 (QFE.050727-8300)
  65.     CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
  66. ----------------------------------------
  67. System.Transactions
  68.     Assembly Version: 2.0.0.0
  69.     Win32 Version: 2.0.50727.832 (QFE.050727-8300)
  70.     CodeBase: file:///C:/WINNT/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
  71. ----------------------------------------
  72.  
It seems to load all the required DLLs, I am using two separate classes (winDBtools.DLL and customFunctions .dll) which are present on the remote machine.


Thank you in advance for any help


Perry :-D
Sep 20 '07 #1
7 1961
Plater
7,872 Recognized Expert Expert
Wow. I am amased you got an access database to work over the network at all.
(at least without creating an odbc object for it)
Only thing I can guess is there is some kinda of computer-based credentials that aren't allowed full access to the database or something?
Sep 20 '07 #2
pod
298 Contributor
well, MS Access is the only alternative for now, and I am able to build really good tools with it, not without struggling but they do work well.

returning to my problem, as I am logged in on both machine with the same user rights, one would think I would have the same access rights from both location. I was under the impression that it could be the machine themselves, ... I don't really know where to go from here, but I will try something else...

Thanks Plater for your input
Sep 20 '07 #3
Plater
7,872 Recognized Expert Expert
Aye, it could be the machine. I was having trouble with my own (granted it was an MS SQL server) where even though I was the same user with all the rights, it was trying to validate the machine as well.
Sep 20 '07 #4
pod
298 Contributor
is this something I have to set in my win App properties? I am looking at the Application files, Prerequisites, and Options under the Publish section tab, and I am finding out all sorts of stuff but nothing that will solve my problem...
Sep 20 '07 #5
Plater
7,872 Recognized Expert Expert
My problem was I had add my computer as a valid user of the database.
Does your database (or the server hosting it) have any strange permisions that need to be set? Like domain permisions?
Sep 20 '07 #6
pod
298 Contributor
no strange permissions needed, and I even gave everyone full control
Sep 20 '07 #7
pod
298 Contributor
FOUND IT!

After talking to a few colleagues, I inserted a few more TRY CATCH tags and found the error: "need MDAC 2.6 or later"

So in the Win App properties, I checked the MDAC in the Prerequisistes

...and with this, the problem disappeared ..

So it was a machine problem after all,

thanks again Plater


P :-D
Sep 20 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

5
6340
by: McGeeky | last post by:
Is it possible to install an assembly on a remote machine's GAC? I don't see an option for it using gacutil.exe -- McGeeky http://mcgeeky.blogspot.com
0
2394
by: Jindrich Prchal | last post by:
Hi there. We are running DB2 v7.2 for Win NT on Windows 2000 SP3 machine with poor configuration AMD 1800+, 512MB RAM and usual IDE harddisk. During tests of migration our batch programmes written in Visual Age Generator by IBM from OS390 to Win2000 was this machine our test machine and migrated programmes ran quick enough there. Batch programmes are generated into C++ code from VaGen 3.1, compiled by MSVC++ and run on the machine with...
2
7074
by: Douglas Harber | last post by:
If I have DB2 8.1 (FP5, I believe, but not relevant to my question...I hope) installed on my desktop, do I have what I need to connect to a remote DB2 server (also running 8.1 FP5) from my desktop machine? I assume, perhaps naively, that all the parts are there but I've spent several hours trying to grasp how to go about accessing the remote server. Specifically, I'm trying to create and populate databases on the remote server from...
3
5093
by: Gerhard Swart | last post by:
Hi all. I'm writing a queue browser that reads queues from a specified machine and then display the data that's on the queue. I am using the MessageQueue Class in .Net(C#). I get the problem that I can't read the journal private queue on a remote machine. I don't know if this is possible though. I have tried all the possible options but can't seem to get it to work. The code that I tried is: MessageQueue _mq = new MessageQueue(...
5
6291
by: Data | last post by:
In my project I want to execute some commands on the remote machine. I am using .Net Remoting to achieve this. My server which is an exe is copied on the remote machine and it receives command from client which is executed by the exe. I am facing problem while executing the exe on the remote machine. If I start the exe manually everything works fine but if I execute it remotely through code using WMI an exception is thrown saying "No...
8
4359
by: Don Riesbeck Jr. | last post by:
I have an C# EnterpriseService component that is part of an application I am developing that is responsible for writing data to an SQL Server. (it reads from a local DB (MSDE), then writes to a 'remote' DB (SQL Server 2k)...) On some machines I get the following exception: System.InvalidOperationException: An error occurred while enlisting in a distributed transaction. at...
1
2573
by: Zanna | last post by:
Hi all! I hope someone can help me. I have in my lan a PC with IIS installed and this works as web server. On another PC I have VS.net 2003 installed. I'd like to debug asp/aspx pages on the remote PC (with IIS). Is it possible?
1
4747
by: Andrew | last post by:
Hey all, Working on revamping our Intranet here and making use of the LDPA, Active Directory, Directory Services, etc. that .Net provides. I am still fairly new on this subject, so the problem I have run into I am not sure how to fix, and really not sure what is causing it. Here's what is going on (test server - Windows 2003 Server): I have a page in a folder (under anonymous authentication in IIS6) that has a link on it that...
9
2696
by: RvGrah | last post by:
After much hair-pulling, I've finally found the answer to a problem that many are fighting with, difficulty connecting from Sql 2005 Server Management or VS2005 to a remote Sql Server running Sql 2000. In my case the server I couldn't reach was across a vpn connection, behind ISA server 2000, (which had port 1433 open). The answer was in this post:...
7
6929
by: Salvador | last post by:
Hi, I am using WMI to gather information about different computers (using win2K and win 2K3), checking common classes and also WMI load balance. My application runs every 1 minute and reports the status of the machines. Upon we follow the .NET object lifetime recommendations the application is constantly consuming more memory! The problem is on the ManagementObjectSearch, upon we Dispose the object it seems that is not releasing the...
0
8878
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8560
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8644
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7389
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5671
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4200
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2012
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.