Solved

Typed Dataset to Web Service

Posted on 2006-06-30
3
309 Views
Last Modified: 2010-04-17
A co-worker has written a moderately sized application.
The application was written to use strongly typed datasets.

Now, however, he has been asked to use a web service to access the database, and not to directly touch the DB. He has the ability to write the web service any way he wants, so long as it is the only means to access the database through the application.

He has a very short amount of time to fix this and has askd me to help. I'm not sure of the best way of doing this without having to modify a LOT of his code. Since I haven't any experience with this type of problem, I'm hoping someone out there knows of an easier way of making the switch.

Looking for fresh ideas.


Thanks,
Tony
0
Comment
Question by:mytonytiger
  • 2
3 Comments
 
LVL 5

Author Comment

by:mytonytiger
ID: 17018340
BTW, we are using VB.NET (VS 2005)
0
 
LVL 8

Accepted Solution

by:
Shakti109 earned 500 total points
ID: 17018495
All that needs to happen is to replace any data access methods wtih method calls
from the webservice, (after the webservice is added as a reference of course).

Example :

Old method using direct access (and ADO):

         CMD.CommandText = DB_cmd_String
         CNN.Open()
         CMD.ActiveConnection = CNN
         RST = CMD.Execute

New method using web-service method (called getdataset)

  dim oWs as new (insert webservice name here)
  dim rpt_data  as new dataset
  rpt_data =  ows.getdataset (query parameters)


Essentially, you modify your central data-access function(s) to call out to the web-service method instead of direct ADO (or whatever other type).

I am hoping the application was written using a central set of data-access functions that are then called from various locations ( I.E :  DB.getdataset, DB.ExecuteSproc, etc). This is very fast and easy, with not much code to modify.

If this is not the case then the first thing to do would be write a central data-access module and put all of the commonly used functions in it, then go back and reference that in the code. This will of course take lots more time and require more effort.

The web-service itself is just a very simple wrapper to a set of defined functions, it can be written to return just about any kind of object he needs (including datasets).
0
 
LVL 5

Author Comment

by:mytonytiger
ID: 17074152
sorry for the delay, I was out of the office last week and neglected to get back to this topic.

What you have suggested seems to be the only way and we have already started to make the modifications. I was hoping to find an alternative solution though. It will require modifying a LOT of his code since he did not create a Data Access layer. He's fairly fresh out of college and this kind of thing happens sometimes. I bet he doesn't do it again though. ;)

Thanks,
Tony
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How does Google get such fast response times? 5 176
VB6 Compile Compatibility Issue 4 102
Installed softare without GUID 6 73
Adding Namespace to the second node of the xml 16 73
This is about my first experience with programming Arduino.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question