Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Remoting / July 2006

Tip: Looking for answers? Try searching our database.

Manual Transactions and Remoting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ryan H - 26 Jul 2006 19:36 GMT
Hi,

My application is written in VB.NET and has a data access layer that resides
on a different server and is accessed via Remoting.

Currently, when performing an update to the database, I pass the SQL string
and connection string to the data access layer like so:
DataAccessLayerClass.RunSQL("UPDATE MyTable SET Column3 = "aa", "data
source=MyDBServer; initial catalog=...")

However, what I would like to do (but tried and failed) is something like
this (from the client):

Try
DataAccessLayerClass.RunSQL("UPDATE MyTable SET Column3 = "aa", ConnObj,
TransactionObj)
DataAccessLayerClass.RunSQL("UPDATE MyTable2 SET Column3 = "bb", ConnObj,
TransactionObj)
TransactionObj.Commit
Catch
TransactionObj.Rollback
End Try

Any help on how to do this (or an alternative solution) using Remoting would
be appreciated.
Cor Ligthert [MVP] - 27 Jul 2006 05:39 GMT
Ryan,

The way you want it is in my idea impossible. The object is living at the
client and the only thing you have is the address of it on that in the
managed heap of the client.

An option to try can be to serialize it on the client and to deserialize it
on the server, but by that you are probably sending much more data than you
do now and is the horse behind the car.

Another system can be to create a dictionary with connectionobjects on your
server and play with that.

Just my thoughts,

Cor

> Hi,
>
[quoted text clipped - 21 lines]
> Any help on how to do this (or an alternative solution) using Remoting
> would be appreciated.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.