What is marshalling?
What is marshalling?
What is marshalling?
What is marshalling?
What is marshalling?
What is marshalling? What is marshalling? What is marshalling? What is marshalling? What is marshalling? What is marshalling? What is marshalling? What is marshalling?
What is marshalling? What is marshalling?
What is marshalling?
Go Back  Xtreme Visual Basic Talk > > > What is marshalling?


Reply
 
Thread Tools Display Modes
  #1  
Old 09-17-2008, 07:30 PM
AaronKimbrough AaronKimbrough is offline
Freshman
 
Join Date: Aug 2008
Posts: 30
Question What is marshalling?


Can someone please explain marshalling in laimens terms.

I have a vb.net application that accesses and updates a MS Access database. The vb application is installed on about 20 computers and is used by multiple users.

I am trying to determine if marshalling will help manage the applications connection to the database. I need to make sure that while one version of the application is accessing the database another versions calls to the DB will have to wait until the first is complete. I am trying to prevent any errors that may occur if two versions try to access the db at the same time.

Thank you.
Reply With Quote
  #2  
Old 09-18-2008, 05:19 PM
sgm sgm is offline
Junior Contributor
 
Join Date: Aug 2003
Location: AlBayda, Libya
Posts: 305
Default

hi
you should use SQL server instead of Access, specially when your data is being used by this number of users simultaneously.
as for the data integrity and trying to prevent errors from users accessing the same data you should use transactions and locks "optimistic locking should be fine" to avoid concurrency issues, of course you'll need to add a field in each table as a time stamp field to facilitate this approach.
good luck
Reply With Quote
  #3  
Old 09-19-2008, 06:18 PM
AaronKimbrough AaronKimbrough is offline
Freshman
 
Join Date: Aug 2008
Posts: 30
Default

Thanks SGM for your suggestions. I am not that familiar with SQL server. I know it is better for application security purposes. But if my understanding is correct, dosen't it require a dedicated server or hardrive space? I have not looked any deeper into using SQL server since I would need to get the IT department to grant me access to certain network resources. Unless I am mistaken.

On the other hand, I am using locks optimistic when I establish my connection to the database. However, while debugging what seems to be a concurrency problem, I came across some articles about marshaling. A lot of the information in the articles was over my head but the method seemed as though it may be usefull to my application.

The articles I found went into detail described their benefits for accessing unmanaged code or otherwise for applications using multi-threading. Now from what I gathered "unmanaged code" means externally stored dll files, or another application. So wouldn't an access db, being a separate application, also be considered unmanaged code? Just wondering if it is worth while for me to continue researching marshaling or if it is a lost cause for my problem.

Thanks Again
Reply With Quote
  #4  
Old 09-19-2008, 11:41 PM
sgm sgm is offline
Junior Contributor
 
Join Date: Aug 2003
Location: AlBayda, Libya
Posts: 305
Default

Hi
my suggestion was based on performance advantages offered by SQL Server, specially for managing multiple connection to the same database.
you can use SQL server express edition which is free and much better than Access, as for hardware requirements you won't need anything special just a pc connected to the network so all the instances of your application would connect to the database on that pc.
if you are using .net then you already have SQLEE installed on your machine.

Quote:
On the other hand, I am using locks optimistic when I establish my connection to the database. However, while debugging what seems to be a concurrency problem
I don't know what do you mean by this?? does your program throw error messages or what?? please clarify so i can understand your problem.
also setting optimistic locks will not guaranty consistent data. i.e it will only make sure that only one operation is done on the locked record at a time, you can solve this by implementing a row version field that contains the last time this record was modified and check the record version before any CRUD operation after that you can provide your user with the information on what to do next "read the data again to get the latest version, ignore and proceed with the operation ...etc"
as for marshalling objects you don't need to worry about that, everything is being done for you through the .net frame work, just concentrate on your business logic.
here is a couple of articles that explains marshalling and demarshalling

http://en.wikipedia.org/wiki/Marshal...puter_science)

http://www.serviceoriented.org/object_marshalling.html

another indepth article is here on how .net is marshalling and demarchalling objects.
http://www.ondotnet.com/pub/a/dotnet...5/copying.html

good luck

Last edited by sgm; 09-19-2008 at 11:57 PM.
Reply With Quote
  #5  
Old 09-19-2008, 11:50 PM
Rockoon's Avatar
Rockoon Rockoon is offline
Joseph Koss

* Guru *
 
Join Date: Aug 2003
Location: Unfashionable End
Posts: 3,615
Default

The basic idea is that one part of a program domain wants to work on data owned and managed by another part.. Marshalling is the contract between the two domains on a protocal for doing precisely that. This avoids the past problems of taking pointers to data as input, where one domain must simply trust the other as to the validity of that pointer.

In many ways, marshalling is the managed code equivilent of copymemory, with some extra type-specific semantics (called serialization) sprinkled on top.
Reply With Quote
  #6  
Old 09-20-2008, 12:39 AM
AaronKimbrough AaronKimbrough is offline
Freshman
 
Join Date: Aug 2008
Posts: 30
Default

Thank you both for your information.
I think I've a handle on this now.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
What is marshalling?
What is marshalling?
What is marshalling? What is marshalling?
What is marshalling?
What is marshalling?
What is marshalling? What is marshalling? What is marshalling? What is marshalling? What is marshalling? What is marshalling? What is marshalling?
What is marshalling?
What is marshalling?
 
What is marshalling?
What is marshalling?
 
-->