471,624 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,624 software developers and data experts.

Can't Pass object ByRef from DLL to Windows Form

I have a web project (ASP.Net/VB.net) with a data access layer class
that passes dataset objects to the web form based on a passed SQL

I tried to reuse this class in a VB.Net Windows form but the ByRef
dataset variable is empty after the call to the data access layer. The
class successfully retrieves the data but the ByRef dataset variable is
empty when examined in the Windows form.

I wrote the same code as a C# Windows Form and it worked fine.

The data access layer is written in VB.Net. I am using Windows 2003

Any ideas as to why the ByRef dataset variable is losing the dataset


Nov 21 '05 #1
1 1918
Found the cause of this problem to be subsequent call to another
function in the data access layer that passed a structure ByVal instead
of ByRef. Have no idea why this affected the contents of the dataset
in a previous unrelated funciton call, but by changing the structure
variable to ByRef the dataset retained its data.

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Henry Jones | last post: by
14 posts views Thread by Siegfried Heintze | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
1 post views Thread by ZEDKYRIE | last post: by

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.