|
all,
while converting a .net class file to a xml webservice i have encountered some problems. First I cannot seem to be able to pass optional parameters to a web method. I have also found problems with the sqldatareader as a "byref" parameter of a web method. This problem entails not being able to return a datareader from a webservice. I also tried to return it via a function and had no luck. Are these limitiations of xml webservices or am I not being creative enough?
For some scenarios instead of using optional parameters I have created overloaded functions and used the "messagename" property of the webmethod to uniquely identify the individual function when publishing the webmethod.
I have not found any real solution for the sqldatareader problem.
Please help!
"Opportunity is missed by most people because it is dressed in overalls and looks like work."
- Thomas Edison
|
|
|
|
|
Optional parameters are not supported on delegate methods, aka Web or Remote methods.
I've never passed an SQLDataReader to/from a Web Service by reference. So, I've never had to deal with the problem. I've always passed the DataSet that the SQLDataReader generated. I can think of a few reasons why this wouldn't work.
1) The SQLDataReader object is not entirely serializable.
2) Chances are, the SQL Server is sitting behind the Web Server, most likely on a different network or subnet, inaccessible to the outside world, except for the web server that runs the Web Service. This means that any SQLDataReader that is passed back to the client can't see the server.
3) Any authentication used by the SQL Server is suddenly going to say that the client machine is an imposter trying to use the token that was created for the web server.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm attempting to loop through the controls on a windows form, but get stuck trying to access control within a groupbox. here's a copy of the code so far
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Ctrl As Control
Dim Grp As Control
For Each Ctrl In Controls
MsgBox(Ctrl.Name)
Next
For Each Grp In GroupBox1 (This is where I get stuck)
I cannot find the correct syntax or code to access the Groupbox itself. In total I have 2 buttons, 6 comboboxes, and 4 checkboxes on the form.
Any ideas out there??
DPF
|
|
|
|
|
try this
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Dim Ctrl As Control<br />
Dim Grp As Control<br />
For Each Ctrl In me.Controls<br />
Messagebox.show (Ctrl.Name)<br />
Next<br />
For Each Grp In GroupBox1.Controls (This is where YOU get stuck)<br />
'CODE<br />
NEXT<br />
Note: use Messagebox.show instead of Messagebox
|
|
|
|
|
i've never actually had to do this myself, but something like this should work:
Private Sub Button1_Click(Byval sender as Object, byval e as System.EventArgs) handles Button1.Click
for each currentControl as control in me.controls
messagebox.show(currentControl.Name)
if ((typeof currentcontrol is groupbox) orelse (typeof currentcontrol is panel)) then
for each subControl as control in directcast(currentcontrol, groupbox).controls
messagebox.show(subcontrol.Name)
next
end if
next
end sub by the way, just as a general rule, try to avoid the calls to legacy vb functions such as MsgBox as much as you can. most everything you can do (i can't think of anything offhand that can't be) with the legacy calls has been replaced by managed class functionality. i.e. Use the system.windows.forms.messagebox class instead of MsgBox function, and String.Substring instead of Instr etc.
hope this helps.
-jim
|
|
|
|
|
Thanks guy's, both sets of code work in my app and it does give me a clue of where to go next.
My next task from here is to use the data from the text boxes and populate an array with the label text in the first column and the data in the second. Is this the best way to approach this, or is it a long route to a short journey??
DPF
|
|
|
|
|
i guess it depends on what you eventually want to do with that data. are you going to be saving it to a database or serialize it to an xml file? if either of the above, i'd recommend looking at an introduction to windows forms databinding and using that. this would allow you to use the controls up front to display the data and have a single structure on the backend (dataset/datatable) that hold the data values. then you don't have to worry about looping through the controls at all. if you need to have the data in an array structure of some sort you can do a conversion from the datatable, to your particular type of array, but the dataset/datatable structures are very flexible and will allow you to do anything that you would be able to do with an array.
generally, looping through all controls on a form is not something that you would want to do in order to obtain the values held in those controls, but more of something you would do in order to set the state of all of those controls. i.e. enabled, disabled, visible etc.
-jim
|
|
|
|
|
Hmm... more food for thought. As a brief overview, I have six forms, each of which has a number of checks again data loaded in the previous form to refine the selction in the current forms comboboxes. Once the selections are satisfied the data is passed back to an array (One per form) for further processing in modules. If it's assumed all works well, it intend to dump the result and data to an xml file and have the ability to load this back into my program at a later date. I hope that makes sense.
I'll read the link above and also on datasets/datatable
Thanks so far
DPF
|
|
|
|
|
I've read the link as provided and although this guides you through binding data from a table to a control I need to pass data from controls on multiple forms back to table,dataset or array for processing, so I have many 'forward' and 'backward'passes. Can anyone suggests where I would start with this. ADO loks interetsing, but is this the best approach bearing in mind my app as above.
DPF
|
|
|
|
|
Hello
Really I have much interrupt with this microsoft DateTimePicker(Killer).I have bind
Date field with dateTimepicker Text Property.This is LateBinding.And I have convert this Datevalue to Hijiri date in Textchaged Event or valuechaged whatever maybe.at that time I found a bug to report. If you select day 31 in a 31 day month, then change the month to a month which has less than 31 days, the code crashes - apparently try to leave the days at 31 in a month that doesn't have 31 days.And it is not working and terminating the application.
without writing any code in events it will work fine
anybody can suggest this.the anybody have third party dattimepicker(for english and arabic inform to me or send it to me)
Ishak
|
|
|
|
|
mohamed ishak wrote:
If you select day 31 in a 31 day month, then change the month to a month which has less than 31 days, the code crashes
What code crashes? Your code?
I've tried the procedure your describing and never had the component crash.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi All
I need to start/stop service running on remote computer programatically using vb6.
Thanks,
|
|
|
|
|
Hi everyone,
I want an application that raises an event when i receive an e-mail. It needs to read the SUBJECT field and BODY of the incoming mail.
I've searched everywhere, but i couldn't find an solution for my problem.
Can someone show me a link, example code or hints how to do this?
Thanks for your time,
Micheal
|
|
|
|
|
There is no such thing as a mail "event". What your talking about is either an extension or add-on to Outlook or whatever mail program your using, or writing a proxy that goes and picks up the mail for your mail application.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi everyone,
i want to develop a simple IVR system using VB.net ...
does anyone have any usefull documents or links for this
Thanks in Advance
Mahmoud Manasrah
Thanks in Advance
Mahmoud Manasrah
|
|
|
|
|
Writing a logic sequence for an IVR system in VB.NET is simple enough. It's the interface to the telephony hardware that gets complicated. There really is no such thing as a writing a "simple" IVR system in something like VB.NET unless you buy a third party tool that handles the low-level communication with the telephone card.
Otherwise you will have to write the hardware interface yourself using the API set that is specific to the type of telephone card you plan on using. And those API's may not even be compatible with NET. It's more likely you would have to use C++ to write the low-level hardware interface.
So there really is no meaningful answer to your question. You have two choices - either buy a third party telephony development suite - typically $5000 plus. Or get a Dialogic card and plan on spending a lot of time studying the APIs, interrupt codes, control characters, etc.
Robert
|
|
|
|
|
hi again
thanks for ur reply, when i talked about the simple ivr system, i meant by it using the modem, well the idea of the project, anyone dial to my pc, the modem get the phone, now the vb.net program will handle user input,, which should be the ID of him, then give him the result back...
isnt the modem enough for something like that?
Thanks in Advance
Mahmoud Manasrah
|
|
|
|
|
Most modems don't support this. You'll need a modem that specifically supports TAPI.
Any the other guy is right, there is no such thing as a simple TAPI IVR application.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi everyone,
i want to develop a simple IVR system using VB.net ...
does anyone have any usefull documents or links for this
Thanks in Advance
Mahmoud Manasrah
|
|
|
|
|
OS: Win XP
Language: VB.net or C#
I have a program where I need to launch 2 separate instances of an App called "Main.exe". Each instance will be piped to there own video display. Both displays need to be running at a screen resolution of 640x480.
I am able to force to screen resolution of the display that the app is launched in(currently only the primary screen), by setting the XP compatibility mode to launch in 640x480. I still haven’t been able to direct which screen the app starts in. Any help would be aswome!
thx,
Joshua
|
|
|
|
|
You can't redirect the display that the app will show on. It will show on the Primary monitor, unless it's code is written to detect multiple monitors.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I do have the code set up to create an arry of the monotors. So I know what monitors are avaliable. Also, I do believe that this is possiable, and this is why: If I were to move a short cut to a nonprimary monitor and launch that shoutcut, the app will then be launch in that monitor.
|
|
|
|
|
Hi to ALL !
I need to develop a software in VB.NET that will monitor Telephone line, like i need to now the dialed number, time etc
Can any one give me some hints regarding this.
Thanks
|
|
|
|
|
You're going to need a new phone system to do this. There isn't a modem out there that will "monitor" the line and convert the dialing tones back to numbers.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I am using Datagrid in my application which has a bool checkbox column.
Sorting property is on for datagrid.
When datagrid is sorted, bool column behaves other way.
Like if i click on the first row of datagrid, it should change the status of firrst row bool column but it changes the status of any other row.
Why is it behaving like this?
Any Solutions?
Sumit Domyan
|
|
|
|