ODBC to call web services

Posted by Learner under C# on 11/20/2012 | Points: 10 | Views : 3617 | Status : [Member] | Replies : 2
Hi ,

I ahve a query relateed to ODBC. Is ther any way I can call webservices through ODBC?




Responses

Posted by: Sravya on: 11/20/2012 [Member] Starter | Points: 25

Up
0
Down
Hi..
use this below Code...It may help

[WebMethod]
public DataSet GetDataSetUsingOdbc()
{
DataSet dataSet = new DataSet();
OdbcConnection odbcConnection = new OdbcConnection(".....");
OdbcDataAdapter odbcDataAdapter = new OdbcDataAdapter("select * from ExpTbl",odbcConnection);
odbcDataAdapter.Fill(dataSet,"Table");
odbcConnection.Close();
if (dataSet != null)
{
return dataSet;
}
return null;
}

With Regards,
sravya

Learner, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Learner on: 11/21/2012 [Member] Starter | Points: 25

Up
0
Down
Thanks Sravya. This is the way to connect to ODB through webservices. But my question is how to connect to webservices through ODBC in .net. Is there any ODBC driver exists which connects to webservices?

ODBC -> webserices

Learner, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response