473,396 Members | 2,070 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,396 software developers and data experts.

C++.NET coding in window form client for interacting with WEb Serv

I have written the Web Services in VBaic .Net. One function interface:
DataSet GetAllPatients()
which will be called in remote client and return DataSet.
I have written the clients by using both C# and VB, and they work fine. Due
to some reason, I have to use C++ in .NET IDE. Now I confuss with the use of
pointer.
I have trouble in coding and compiling. The following is my simple code,
anyone could be kind of helping me to figure out the problem. Thank you very
much.
In Form1.h file I have the code

private: System::Data::DataSet * dsAllPatients;
private: System::Windows::Forms::DataGrid * dgPatients;
private: WebRefFTPLocation::FTPLocationWebService * ProxyGetAllPatients;

private: System::Void Form1_Load(System::Object * sender, System::EventArgs
* e)
{
dsAllPatients->Clear();
dsAllPatients = new DataSet("Patients");
dsAllPatients=ProxyGetAllPatients.GetPatients();
dgPatients->DataSource = dsAllPatients;
dgPatients->DataBindings;

}
EORROR message:
d:\..\WebServicesClientFTP\simpleFormClient\Form1. h(241): error C2228: left
of '.GetPatients' must have class/struct/union type
David
Nov 21 '05 #1
2 1262
I found one bug at: dsAllPatients=ProxyGetAllPatients.GetPatients();
It should be: dsAllPatients=ProxyGetAllPatients->GetPatients();

But I still get runtime error when run it:
"An unhandled exception of type 'System.NullReferenceException' occurred in
system.web.services.dll

Additional information: Object reference not set to an instance of an object.
"
What wrong with it. Thanks.

David
"david" wrote:
I have written the Web Services in VBaic .Net. One function interface:
DataSet GetAllPatients()
which will be called in remote client and return DataSet.
I have written the clients by using both C# and VB, and they work fine. Due
to some reason, I have to use C++ in .NET IDE. Now I confuss with the use of
pointer.
I have trouble in coding and compiling. The following is my simple code,
anyone could be kind of helping me to figure out the problem. Thank you very
much.
In Form1.h file I have the code

private: System::Data::DataSet * dsAllPatients;
private: System::Windows::Forms::DataGrid * dgPatients;
private: WebRefFTPLocation::FTPLocationWebService * ProxyGetAllPatients;

private: System::Void Form1_Load(System::Object * sender, System::EventArgs
* e)
{
dsAllPatients->Clear();
dsAllPatients = new DataSet("Patients");
dsAllPatients=ProxyGetAllPatients.GetPatients();
dgPatients->DataSource = dsAllPatients;
dgPatients->DataBindings;

}
EORROR message:
d:\..\WebServicesClientFTP\simpleFormClient\Form1. h(241): error C2228: left
of '.GetPatients' must have class/struct/union type
David

Nov 21 '05 #2
most likely ProxyGetAllPatients is null or dsAllPatients is null (never
init'd). also not sure of the following code:

dsAllPatients->Clear(); // why clear if
reassign in next statement
// and
who inits it?
dsAllPatients = new DataSet("Patients"); // why if next statment
dsAllPatients=ProxyGetAllPatients->GetPatients();
-- bruce (sqlwork.com)
"david" <da***@discussions.microsoft.com> wrote in message
news:69**********************************@microsof t.com...
I found one bug at: dsAllPatients=ProxyGetAllPatients.GetPatients();
It should be: dsAllPatients=ProxyGetAllPatients->GetPatients();

But I still get runtime error when run it:
"An unhandled exception of type 'System.NullReferenceException' occurred
in
system.web.services.dll

Additional information: Object reference not set to an instance of an
object.
"
What wrong with it. Thanks.

David
"david" wrote:
I have written the Web Services in VBaic .Net. One function interface:
DataSet GetAllPatients()
which will be called in remote client and return DataSet.
I have written the clients by using both C# and VB, and they work fine.
Due
to some reason, I have to use C++ in .NET IDE. Now I confuss with the use
of
pointer.
I have trouble in coding and compiling. The following is my simple code,
anyone could be kind of helping me to figure out the problem. Thank you
very
much.
In Form1.h file I have the code

private: System::Data::DataSet * dsAllPatients;
private: System::Windows::Forms::DataGrid * dgPatients;
private: WebRefFTPLocation::FTPLocationWebService * ProxyGetAllPatients;

private: System::Void Form1_Load(System::Object * sender,
System::EventArgs
* e)
{
dsAllPatients->Clear();
dsAllPatients = new DataSet("Patients");
dsAllPatients=ProxyGetAllPatients.GetPatients();
dgPatients->DataSource = dsAllPatients;
dgPatients->DataBindings;

}
EORROR message:
d:\..\WebServicesClientFTP\simpleFormClient\Form1. h(241): error C2228:
left
of '.GetPatients' must have class/struct/union type
David

Nov 23 '05 #3

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

Similar topics

13
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to...
18
by: Andrew Poulos | last post by:
If I manage to call the following bit of javascript in IE and MZ w = window.open("", "s", 'status=no,resizable=no,width=450,height=450'); I get a window that is not resizable and without a...
0
by: Bartas | last post by:
Hi, I'am writting a simple SOAP client in python (2.4) using SOAPpy lib. I've met with this problem: when I want to send a list of complex type using some method from WebService(java,WAS), ...
5
by: John Scott | last post by:
Ok..this a rather odd question/problem. I haven't really found a straight forward answer to how to handle this scenario, so I hope someone here can help. Here it is: I have an application...
1
by: =?Utf-8?B?Vmlua2k=?= | last post by:
Hello Everyone, I have created a very simple window service. This window service in turn is calling a function that exist in a windows form. When I am trying to run this windows service. window...
19
by: auratius | last post by:
http://www.auratius.co.za/CSharpCodingStandards.html Complete CSharp Coding Standards 1. Naming Conventions and Styles 2. Coding Practices 3. Project Settings and Project Structure 4....
7
by: =?Utf-8?B?Vmlua2k=?= | last post by:
public void sendKeysTest() { Process myProcess = Process.Start(@"C:\winnt\system32\cmd.exe"); SetForegroundWindow(myProcess.Handle); if (myProcess.Responding) SendKeys.SendWait("{ENTER}");...
0
by: micksey | last post by:
i have a form linked with access database. code goes like this: <%while not serv.eof %> <tr valign="top"> <td height="30"> <%=serv.fields("serialno") %> </td> <td> <input name="txtSCorCO"...
0
by: joshuajnoble | last post by:
Hi all, I'm having a strange problem where I need to build out form variables in an HTTPWebRequest and send them to an aspx page for processing. The page isn't recognizing the form variables at...
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
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.