473,395 Members | 1,653 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,395 software developers and data experts.

How can I access data of a remoting object from GUI

Hi all,
I am trying to do a 3-tier application to learn C#. Now I got a WinForm as
GUI, a service, and a remoting object "SqlSender" to connect MSDE. I found
such interesting thing. See following code snippet:

// Host A - Client WinForm - MyGui
....
public void buttonFind_Click(object sender, System.EventArgs e)
{
string cmdStr = "SELECT * FROM table";

// send out SQL command via remote object SqlSender
SqlSender sqlSender = new SqlSender();
sqlSender.sqlSelectRequest(cmdStr);

// !!! problem here, the dataSet1 is EMPTY ?!
sqlSender.printRows(sqlSender.dataSet1);
}

// Host B - SqlSender to connect data base
public class SqlSender : MarshalByRefObject
{...
public void sqlSelectRequest(string cmdStr)
{
try
{
// clear the DataSet from the last operation
dataSet1.Clear();
this.sqlSelectCommand1.CommandText = cmdStr;
this.sqlDataAdapter1.SelectCommand.Connection = sqlConnection1;
sqlConnection1.Open();
this.sqlDataAdapter1.Fill(dataSet1, "table");
sqlConnection1.Close();

//if I put "printRows(dataSet1)", it is ok, dataSet1 already gets the
data
}
...
}
}

It seems that WinForm cannot access the DataSet. How can I show the data
that was retrieved by the Remoting object "SqlSender" in GUI then? Is it
still possible to use DataBinding as if they are locating on one machine? I
tried to delcare the dataSet in "SqlSender" with "static" but it doesn't
help. This question has disturbed me the whole weekend, please help!

cheers,
eedych
Nov 17 '05 #1
0 1005

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

Similar topics

0
by: Uma Vivek | last post by:
Hi, I have a problem with Flash remoting via .NET . I seem to have all the code right, but flash does not seem to display the data at all. Here's is what Ive done so far... (1) Ive...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool This article makes a detailed comparison among SourceAnyWhere, SourceOffSite, VSS...
1
by: Ron L | last post by:
I am trying to setup a solution that will include a client which will access a database via remoting calls. I am hosting my remoting project in IIS, and am using Windows Integrated security. ...
2
by: Dennis Stew | last post by:
How do I access Public variables within a Windows Service? I can, and have, created installed and executed a basic Service. From my client App I can Start, Stop...etc the service.... What I want...
9
by: Mark | last post by:
I want to put out a Excel or Access database spreadsheet on a web page. Can I do this and will it let me update the spreadsheet or will it be a static web page? If not then should I put it out...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed...
3
by: Sunny | last post by:
Hi all, I'm creating client/server app in C# (VS. 2003). So, I need the client to call the server with some auth info (user and pass). If the auth is OK, server will do some work and will prepare...
0
by: JTS | last post by:
I need to create three ASP.NET applications - each one will run on a different production server. Each application does basically the same thing with respect to data access; the apps differ...
2
by: | last post by:
Dear Groups, I am trying to develop a simple client <-> server application where (for database security reasons) the server only has access to the centralised database (and a file repository),...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.