|
Get the value of the following:
Branch: HKEY_CURRENT_USER
Key: Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
Value: AppData
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
We're about to migrate our server application to .Net and having multiple client interface with sometimes done in VB6 or C++. While the server application (it's a C# web service) is dealing with database, I'd like to know if there's easy way to transform the type Dataset from ADO.Net to the classic ADODB.Recordset (our needs is to get the data in read-only, so, don't really mind if somebody propose using Datareader) ?
For example if the .Net server has method:
int GetDataSet(out System.Data.DataSet dts)
is there any way to call it from classic VB6 / unmanaged C++ code ? If not, what's the alternative (transform it to XML formatted string manually ?) ?
|
|
|
|
|
The easiest way is writing a .NET COM component that calls the web service. If you can't, your alternative would be calling it from C# with a dataset and look at the SOAP message (using a HTTP monitor or EtherReal) that is being sent/received. Then, from VB6, post a similar XML by using HTTP to the web service and parse the resulting SOAP message.
May I add that returning a dataset from a webservice is a bad practice? It limits a lot your platform options when calling that webservice.
From the Churchdown Parish Magazine: "Would the Congregation please note that the bowl at the back of the Church, labelled 'For The Sick,' is for monetary donations only."
|
|
|
|
|
Thanks,
I agree that's not a good practice, so what's your suggestion if I need to display the data (table) from a database to the client interface ? My need is to display the data only on the web page and on normal client WinForm.
I'm quite beginner in .Net, and I found that the way of calling a web service from windows application is by creating a proxy (in case of using Dataset, as I understand the proxy will do the marshalling job, to convert back the SOAP message from web service into Dataset, isn't it ?), but don't know how to keep the SOAP message as it is. Change the conversion type ? Do you have any example or link for that ?
|
|
|
|
|
hanofee wrote: I agree that's not a good practice, so what's your suggestion if I need to display the data (table) from a database to the client interface ?
Return an array of a class, e.g., "Customer", instead of returning a dataset.
You can even bind your controls to this array, instead of binding to the dataset, and everything should work.
From the Churchdown Parish Magazine: "Would the Congregation please note that the bowl at the back of the Church, labelled 'For The Sick,' is for monetary donations only."
|
|
|
|
|
Thanks again,
Do you mean that an array of a class is more generic than Dataset transformation to be multiplatform ?
(sorry, just think that working with class across web service might bring more trouble)
|
|
|
|
|
hanofee wrote: Do you mean that an array of a class is more generic than Dataset transformation to be multiplatform ?(sorry, just think that working with class across web service might bring more trouble)
But that's the "correct" (I don't like this word) way returning data. By using arrays of simple or complex classes, any decent web service tool can access it. Datasets are a more complicated data type, which can still be accessed, but only by coding a lot.
You can find further discussion about this on Google, but a notorious article with a funny title is this:
Returning DataSets from WebServices is the Spawn of Satan and Represents All That Is Truly Evil in the World[^]
Other nice articles are:
Top 5 Web Services mistakes[^]
Web services and the use of datasets.[^]
Even MSDN documents your specific problem with VB6 and Datasets in:
Web Serices and DataSets[^]
As an additional note, I had so much trouble with DataSets that I simply don't use them for anything else, but this is a matter of personal taste, so I can't say that this is a good practice.
From the Churchdown Parish Magazine: "Would the Congregation please note that the bowl at the back of the Church, labelled 'For The Sick,' is for monetary donations only."
|
|
|
|
|
I have a small application which displays a popup at a given intervals. It has a disable function too. When the program is disbaled, it no longer shows those popups. This works perfectly fine as long as the user Enables/Disbales the program by clicking the appropriate button. How can i Enable/Disable the program by passing it a command from another program while it is running? Would I have to use some concept such as DDE (which has been replaced by Remoting, I've heard)? If so, how?
|
|
|
|
|
Why not simply use SendMessage with WM_USER+number from the client?
SendMessage(hwnd, WM_USER+5, 1, 0) (1st parameter: window handle of the application, 3rd parameter: 1=enable, 0=disable)
Inside your application you should register this message type with RegisterWindowMesssage
Take a look at this
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Does anybody know of a way of persisting data in a Web Service across unconnected calls.
As an example - I have a Web Service that holds configuration data in a database (for various reasons it cannot go into web.config). This configuration data is exactly the same for all requests that are made to the web service endpoints. At the moment on every request the data has to be read even though it doesnt change. So is there anyway I can keep a global cache of that data so that I can save the overhead of retrieving it multiple times?
Should the configuration change, then the web service would need to be restarted or there would be an administrative function to clear the cache.
|
|
|
|
|
A web service has access to the same Application object as an ASP.NET page - this is shared storage amongst all users of the Web Service. It is reset when the web service is restarted.
Another way would be to create your own shared data storage... any search for "Singleton Design Pattern" should get you started.
|
|
|
|
|
Hi Friends,
I would like to know that how to check whether up/down button was clicked on the NumericUpDown Control in .NET 2005.
Any help would be greatly appreciated.
With warm regards,
KEDAR
|
|
|
|
|
Handle the control's ValueChanged event.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Hi there evrybody,
I am new to programming... I'm busy doing C# programming, well I'm still on the beginning but I'm getting there.
But anyway I need a solution to one problem that I have. Here is it:
Create a form with two list boxes. Add a number of items to one list box at design time using the Properties window. Create a button that, when clicked, removes the selected item in the first list and adds it to the second list.
You would probly say, that is peanuts... But for me, I'm new I don't know much yet. It's mind boggling.
Can anybody pleas help me with a solution to this.
Thank you,
Johan
|
|
|
|
|
A problem phrased like that just doesnt happen in the real world, which means this is homework. While nobody here has any problem with helping people out with their homework, you are unlikely to find somebody who will just give you the code.
So, give it a try yourself, and hit us back with any specific programming problems you encounter, remembering to include the code.
|
|
|
|
|
As the other poster said, we won't give you a solution, but we're glad to help you out. What part of the assignment do you not understand? Are you having problems creating the form in the .NET interface? Are you having problems with the initial population? Or are you having problems with the transfer from one list box to the other?
Again, ask a specific question and there will be a lot of people who will be glad to point you in the direction of an answer, or provide a small answer themselves, but we won't do your work for you.
|
|
|
|
|
How can we retrive the day(Sunday,Monday....etc) of a date
|
|
|
|
|
The DateTime object has a DayOfWeek property of type System.DayOfWeek
|
|
|
|
|
|
hi i want write a program that work like "TZ Executable Protector" that input to an exe file and convert it to dat file and add a loader file to calling exe from dat file but how do dat ?
please give me algorithm and source... thanks
|
|
|
|
|
hdv212 wrote: please give me algorithm and source... thanks
XOR!
|
|
|
|
|
hi and thanks for tour reply but how i use from XOR ?
please give me algorithm or source...
thanks ...
|
|
|
|
|
hi
I am having strange problem in my class file.I am adding collection to support vector struct but it gives me these two warnings
C:\Visual Studio Projects\Cons12\EntryPoint.cs(24): 'Cons12.VectorClass.Vector' defines operator == or operator != but does not override Object.Equals(object o))
C:\Visual Studio Projects\Cons12\EntryPoint.cs(24): 'Cons12.VectorClass.Vector' defines operator == or operator != but does not override Object.GetHashCode()
I am unable to understand what it is and how it can be resolved
Can anyone explain me how and why it happens the above error
thanks in advance
sasi
|
|
|
|
|
Did you used the overwrite word in the definition of the new operator?
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
yes i have used override method
its give me output but with the above mentioned two errors
what causing it exactly any idea
sasi
|
|
|
|