Hi All,

Quick one, I am calling a web service that returns a dataset but the company doesn't know what structure is in the dataset anymore as the original programmer has left. The webservice code calls a stored procedure that they can't access. Is there anyway to call the webservice in vb.net and output the whole dataset to something so I can see data table names and format etc...

Cheers
Will

It depends on the security and type of database. There is the Connection.GetSchema method to return what you are looking for. From MSDN Click Here

If you have retrieved the dataset, you can write the schema to a file.

Dim s As IO.Stream = IO.File.OpenWrite("Unknown.xsd")
UnknownDataSet.WriteXmlSchema(s)
s.Close()

After running this code, go to visual studio, and from the Project Menu, select add existing item and add "Unknown.xsd". Then from the Solution Explorer, right-click on Unknow.xsd and select "View Designer". You will see all the returned tables and can inspect the columns via their properties.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.