473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 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
query.

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
Server.

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

Thanks.

Nov 21 '05 #1
1 2003
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Vanessa | last post by:
Hi, I would like to know whether there's any way for me to pass an object by reference to another form? Regards Vanessa
3
by: Alex Stevens | last post by:
Hi. I have a class and it exposes a property, which accepts a parameter collection object. I want the class to use the parameter object and update it. However I don't want to use a copy of the...
14
by: Robin Tucker | last post by:
Although I've been working on this project for 8 months now, I'm still not sure of the difference between ByVal and ByRef. As most objects in VB are reference types, passing ByVal I've discovered...
1
by: Terrance | last post by:
Hello, I was wondering if someone can help me understand something. Below is some code that I got from the MS website that is suppose to authenticate for the username and password on the local...
2
by: aName | last post by:
How can this work ? http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsdragactionclasstopic.asp In Vbasic( see code below) e is pass ByVal so a...
8
by: Henry Jones | last post by:
Using VB.NET 2005. I have a Function that I would like to pass the form name and the textbox name to. ----------------------------------------- Function DoSomeThing(byref frmOBJ as Object,...
6
by: dav61000 | last post by:
I have a parent form that uses a Treeview Control and I would like to pass the node selected to a child form where the user will add update or delete the record selected using a dataset. Is there a...
14
by: Siegfried Heintze | last post by:
Why does VB.NET V2 force me to pass by value for my set function? When I try to change it to const byref it gives me a syntax error. It seems very inefficient to be passing strings around by value...
2
by: Tanzen | last post by:
Here's what I'm trying to do in vb.net 2005. I have a public declared method that sets the value of a control on a form, but that form could change, so I don't want to code its actual name. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...
0
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...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.