473,692 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows Forms No-Touch Deployment problems using DAO on User-Level Secured Access DB to access groups 1

I have a VB windows forms application that accesses a Microsoft Access
database that has been secured using user-level security. The
application is being deployed using No-Touch deployment. The objective
in utilizing this new deployment method is to reduce the maintenance
overhead as well as making it easier for my users to setup and run the
application initially. I have VS 2002, Windows XP, Access XP(2000
format).

He is my problem. Since the database is secured, I must provide a way
for my users to change their passwords. Also, some forms access tables
that certain permission groups do not have access to. So instead of
letting the error come up when they open the form and try to update,
at logon I am searching through the groups that the user belongs to
and locking out access to these forms if they do not have permission.
The only way I know to do these 2 functions is to use DAO. However,
for accessing and updating my data, I'm using ADO.NET.

So I have included DAO 3.6 using Project>>Add References>>COM tab in
the VS project.
I No-Touch deployed it and most users are working, running the gamut
from Windows NT 4.0 to Windows XP, admins and non-admins.

Then there was this 1 machine, then another...It is now 3 machines.
Each have different errors or none at all(app won't even open). On 1
of the 3 I have a strong belief due to the nature of the errors that
it is just something wrong with the machine. The user has reported
problems with the unit before my app was placed on it.

Now on the last 2 machines....1 is Windows NT 4.0 and crashes before
the app even opens, the other is Windows 2000 and has the error of
"QueryInter face for interface DAO._DBEngine failed.". I thought that
maybe installing MDAC would work. So I put the version of MDAC that
all the machines have including mine(2.6) on both, and same error. I
have also made sure that the Jet 4.0 engine is setup and current. I
thought that maybe the dao360.dll was not properly registered or set
up which is why I did these steps. No change. I checked the registry
and "HKEY_CLASSES_R OOT\DAO.DBEngin e.36\CLSID" is present. I don't know
if that even matters. Also, I have a VB6 app that uses dao360.dll on
these machines and this VB6 app works. The more I work on this, the
more I think it is not just this machine, but rather something(s) I'm
doing wrong in .NET(also taking into account the 2 other users and
even more mentioned below). The framework version on these machines
is the same as mine 1.0.3705.

NOW HERE IS THE DOOZY:
Since this is No-Touch deployment I am accessing the app by clicking a
link in the browser of course(IE 6.0). It errors. If I instead browse
out to the folder using Windows Explorer....IT RUNS FINE ON BOTH
MACHINES!!? My limited knowledge about .NET No-Touch doesn't help me
understand this much. This re-enforces my belief it is me and not the
just the machines.

But if I understand right, doesn't No-Touch put the assemblies in the
GAC. Maybe I can force what I need into the GAC or something along
those lines. How could I remedy/do this? It seems that on the NT 4.0
machine it can't find any assemblies even to open and the Windows 2000
machine just can't find the DAO assembly.....bu t I'm probably way
off??

Here is the .NET code and the spot that errors out when No-Touch is
used:
Dim wks As DAO.Workspace
Dim theEngine As New DAO.DBEngine()
' Open the workspace, specifying the system database to use

'************** *** error
theEngine.Syste mDB = AccessDatabaseP ath & AccessWorkgroup Name'this is
the line that errors
'************** *** error

wks = theEngine.Creat eWorkspace("", UserName, OldPassword)
' Change the password for the user Admin
wks.Users(UserN ame).NewPasswor d(OldPassword, NewPassword)
ChangePassword = True

'I have a loop that gets the users permission groups here

As a matter of fact if I try to reference any of the DBEngine's
methods or properties it errors on this machine.

Also,

I tried latebinding:
Dim theEngine As DAO.DBEngine
theEngine = CreateObject("D AO.DBEngine.36" )

and it errors with a message: "Specified cast is not valid."

Here is the VB6 code that works:

Dim wks As DAO.Workspace
Dim usr As DAO.User
' Open the workspace, specifying the system database to use
DBEngine.System DB = theSysDB
Set wks = DBEngine.Create Workspace("", UserName, OldPassword)
' Change the password for the user Admin
wks.Users(UserN ame).NewPasswor d OldPassword, NewPassword
DAOChangePasswo rd = True
WHAT I'D LIKE TO KNOW:
I know that .NET is trying to avoid "DLL HELL" and that by using COM
items I'm throwing myself back into it. I'd love to use ADO.NET(or
anything else in the framework) to do what I'm doing with DAO
but....how....c an it even do it(getting user group and password in
from *.mdw)?

How does No-Touch work, for instance, the point I made above about the
app running from the folder and not the browser, could the method of
No-Touch deployment be the problem, and if so how can one fix it,
something like forcing stuff into the GAC or other method? Basically
why does it work when executed from the folder directly, but not from
the Browser using No-Touch deployment on this particular machine(yes I
know you would have to see the machine, but what COULD it be, maybe
just some things for me to check)?

Even if ADO.NET or other item can do what the DAO is doing I'd still
like to know the way to get COM items to work with the "No-Touch"
philosophy. Meaning little to no maintenance. In addition to the 3
user mentioned above I have had others with errors. I was able to
resolve them simply by installing MDAC 2.6 or later. This kind of
defeats my purpose.

Is it possible to deploy(via No-Touch deployment) projects using COM
items and still fully reap the benefits of No-Touch in every case(ie
no DLL HELL)?

Is there some special tricks that can perhaps still use COM items and
avoid "DLL HELL", or is it that if you go using COM items your just
stuck taking the risks?
If there are tricks, what are they?

If no tricks, then if COM must be used, are there precautions that can
reduce the problems?

Are there any books, etc. that are very thorough on "No-Touch"
deployment

Any other pointers would be most appreciated. Thanks in advance.

JL
Nov 20 '05 #1
0 3051

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
464
by: Bilo | last post by:
I have a Windows Forms Class MainGUI I have declared MainGUI maingui; public System.ComponentModel.Container components = new Container(); in the Class I call another class MediaDriver with the Constructor class MediaDriver {
5
8775
by: andy.g.ward | last post by:
I keep getting this when trying to create an MFC activex control in a c# windows service - anyone got any ideas what the missing module could be??? Exception thrown : System.IO.FileNotFoundException: The specified module could not be found. at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid) at System.Windows.Forms.AxHost.CreateWithoutLicense() at...
2
5529
by: fperfect13 | last post by:
Hi, I have the folowing exception Exception : System.NullReferenceException: Object reference not set to an instance of an object. 00000019 3:30:48 PM at System.Windows.Forms.UnsafeNativeMethods.GetOpenFileName(OPENFILENAME_I ofn) 00000020 3:30:48 PM at
2
7818
by: Raed Sawalha | last post by:
i have a windows form(Main) with listview, when click an item in listview i open other window form (Sub) which generate the selected item from parent window in as treeview items when click any item in treeview i display the content item in axWebBrowser, i close the sub form normally when i close the main the following error is generated An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll ...
1
1774
by: Günther Rühmann | last post by:
Hi, I´m not sure if i´m right int this group... My problem: I made a vb .net application that reads from AD via System.Directoryservices.Directoryentry. The appliocation enumerates group members. It works fine on W2k - machines. It works on a WinNT 4 - server, too, but it stops with a runtime error on any Windows 4.0 Workstation. The error is: System.Runtime.InteropServices.COMException 0x800500F. at...
9
2141
by: Günther Rühmann | last post by:
Hi, I´m not sure if i´m right int this group... My problem: I made a vb .net application that reads from AD via System.Directoryservices.Directoryentry. The appliocation enumerates group members. It works fine on W2k - machines. It works on a WinNT 4 - server, too, but it stops with a runtime error on any Windows 4.0 Workstation. The error is: System.Runtime.InteropServices.COMException 0x800500F. at...
5
4277
by: Fredrik Melin | last post by:
2005 uses the Partial Class & <form>.Designer.vb for its "windows forms generated code" Anyone know if its faster/better then old 2003 way? Also, when upgrading a 2003 project it did not change that, it left it the "old way", is there a easy way to split them up or do I have to do it manually If I want to do it? Regards
8
1688
by: Doug Lerner | last post by:
I have this snippet of client side code running: var makeField = document.forms; alert("makeFieldName name,length,type=" + makeFieldName + ", " + makeField.name + "," + makeField.length + "," + makeField.type); The alert is just in there for debugging.
2
11717
by: sambo251 | last post by:
After running a few updates I get this very annoying "Windows Installer" error #1706 that will ne go away! It keeps saying that it cannot find the file "instantsharedevices.msi", that it is on another CD, and gets caught in a loop when I try to delete it! It mentions MS.net frame error # 1706. The "details" code follows...hope someone can help me to either fix it or get out of the loop! I tried running "Windows Registry Repair Pro"...but no help...
28
7365
by: | last post by:
I have a multi threaded windows form application that runs great after calling Application.Run(). Application.Run is required for a COM component I a using in the app (required for message loop). I have created a windows service from VStudio 2005 template. What is the windows service replacement for Application.Run()?
0
8538
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9083
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...
0
8960
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8797
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
7627
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
5818
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
4557
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2972
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
3
1957
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.