Advertisement

04.02.2008 at 01:35PM PDT, ID: 23290828
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.3

WebService, returning string or object

Asked by Cannibal_Jack in Server Side Includes (SSI), Programming for ASP.NET, Microsoft Visual Basic.Net

Tags:

Hi, I'm using asp.net and vb.net. I have just written my first web service and I've run into a few problems. The service itself receives a string (a personal ID number) and searches an SQL database for a match and then displays the person's information that matches the string. Here's what I have...

        Dim Connection As String = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Test\TestService\ Database.mdf;Integrated Security=True;User Instance=True"

        Dim ConnA As New Data.SqlClient.SqlConnection(Connection)
        ConnA.Open()
        Dim SQLC As String = "SELECT * FROM Personal WHERE PNum = '" & StringNum & "'"
        Dim dataAdap As New Data.SqlClient.SqlDataAdapter(SQLC, Conna)
        Dim dataset As New Data.DataSet
        da.Fill(ds, "Personal")
        ConnA.Close()
        Dim MyObject As Object
        MyObject = dataset
       
        Return MyObject

I have added the service to my site project as a reference and I have a textbox to enter the string and a button to call the service. The problem is with the web service I think, I can only return a string when I wish to return an object with results in it. When I run it and enter info in the textbox and click the button it tells me I need to pass a string not an object. Can someone give me some advice and help me solve this?
Any help would be great, thanks.Start Free Trial
[+][-]04.02.2008 at 02:06PM PDT, ID: 21267544

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Server Side Includes (SSI), Programming for ASP.NET, Microsoft Visual Basic.Net
Tags: VB.NET ASP.NET
Sign Up Now!
Solution Provided By: McExp
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628