Home All Groups Group Topic Archive Search About
Author
14 Mar 2006 1:18 PM
Philip Wagenaar
I have an application that can be 'queried' by sending an http post, in
return I get an XML file.

I have another application that can only work with ODBC.

I am asked to write a 'bridge' between these two.

What would be the best way to achieve this?

Author
14 Mar 2006 3:40 PM
raulavi
Hi philip:
You could achieve this using a DataSet.
a Dataset can read and write data and schema as XML documents.
then, depending on what is next use ado.net classes to continue working with
the dataset.
I access all my ODBC tables using ds
search the help for dataset class
good luck

Show quoteHide quote
"Philip Wagenaar" wrote:

> I have an application that can be 'queried' by sending an http post, in
> return I get an XML file.
>
> I have another application that can only work with ODBC.
>
> I am asked to write a 'bridge' between these two.
>
> What would be the best way to achieve this?
Author
14 Mar 2006 3:51 PM
Philip Wagenaar
How can an application access the DataSet through odbc?

Show quoteHide quote
"raulavi" wrote:

> Hi philip:
> You could achieve this using a DataSet.
> a Dataset can read and write data and schema as XML documents.
> then, depending on what is next use ado.net classes to continue working with
> the dataset.
> I access all my ODBC tables using ds
> search the help for dataset class
> good luck
>
> "Philip Wagenaar" wrote:
>
> > I have an application that can be 'queried' by sending an http post, in
> > return I get an XML file.
> >
> > I have another application that can only work with ODBC.
> >
> > I am asked to write a 'bridge' between these two.
> >
> > What would be the best way to achieve this?
Author
14 Mar 2006 4:21 PM
raulavi
I use a function where I pass my sql strint parameter and return the datatable
    Public Function ReturnTbl(ByVal SQLParm As String) As DataTable
        Dim cn As New OdbcConnection(CnString)
        Dim da As New OdbcDataAdapter(SQLParm, cn)
        Dim dt As New DataTable
        Try
            da.Fill(dt)
        Catch ex As Odbc.OdbcException
            '??            Throw New
DataException(MessageBox.Show(ex.ToString & vbLf & "", "DataBaseException "))
            'User error msg
            MsgBox(SQLParm _
                       & vbLf & vbLf & " " & ex.Message,
MsgBoxStyle.Critical, "SOSErr ")
        Catch DBex As DataException
            Throw New DataException("Unable to retrieve data")
        End Try

        Return dt

    End Function

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconxmldataset.asp


Show quoteHide quote
"Philip Wagenaar" wrote:

> How can an application access the DataSet through odbc?
>
> "raulavi" wrote:
>
> > Hi philip:
> > You could achieve this using a DataSet.
> > a Dataset can read and write data and schema as XML documents.
> > then, depending on what is next use ado.net classes to continue working with
> > the dataset.
> > I access all my ODBC tables using ds
> > search the help for dataset class
> > good luck
> >
> > "Philip Wagenaar" wrote:
> >
> > > I have an application that can be 'queried' by sending an http post, in
> > > return I get an XML file.
> > >
> > > I have another application that can only work with ODBC.
> > >
> > > I am asked to write a 'bridge' between these two.
> > >
> > > What would be the best way to achieve this?
Author
14 Mar 2006 4:32 PM
Philip Wagenaar
Thank you.

But the problem is not retrieving data through odbc in vb.net. The problem
is making data avalible to other applications through odbc.

Show quoteHide quote
"raulavi" wrote:

> I use a function where I pass my sql strint parameter and return the datatable
>     Public Function ReturnTbl(ByVal SQLParm As String) As DataTable
>         Dim cn As New OdbcConnection(CnString)
>         Dim da As New OdbcDataAdapter(SQLParm, cn)
>         Dim dt As New DataTable
>         Try
>             da.Fill(dt)
>         Catch ex As Odbc.OdbcException
>             '??            Throw New
> DataException(MessageBox.Show(ex.ToString & vbLf & "", "DataBaseException "))
>             'User error msg
>             MsgBox(SQLParm _
>                        & vbLf & vbLf & " " & ex.Message,
> MsgBoxStyle.Critical, "SOSErr ")
>         Catch DBex As DataException
>             Throw New DataException("Unable to retrieve data")
>         End Try
>
>         Return dt
>
>     End Function
>
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconxmldataset.asp
>
>
> "Philip Wagenaar" wrote:
>
> > How can an application access the DataSet through odbc?
> >
> > "raulavi" wrote:
> >
> > > Hi philip:
> > > You could achieve this using a DataSet.
> > > a Dataset can read and write data and schema as XML documents.
> > > then, depending on what is next use ado.net classes to continue working with
> > > the dataset.
> > > I access all my ODBC tables using ds
> > > search the help for dataset class
> > > good luck
> > >
> > > "Philip Wagenaar" wrote:
> > >
> > > > I have an application that can be 'queried' by sending an http post, in
> > > > return I get an XML file.
> > > >
> > > > I have another application that can only work with ODBC.
> > > >
> > > > I am asked to write a 'bridge' between these two.
> > > >
> > > > What would be the best way to achieve this?
Author
16 Mar 2006 12:59 PM
Yuan Ren[MSFT]
Hi Philip,

Thanks for your post!

For the current issue, as far as I know, there is no interface of XML which
can be accessed directly by using ODBC driver. If you want to use other
applications (no .NET application) to access the XML data source, I think
using XML SDK is a good way.

In addition, you can import the XML data to SQL server and use the ODBC to
access the SQL Server. Thanks for your understanding!

Regards,

Yuan Ren [MSFT]
Microsoft Online Support
Author
17 Mar 2006 10:53 AM
Philip Wagenaar
Yuan,

That indeed seems like the best option. I could use SQL Express 2005 for
this right? I mean I can redistribute this freely with my application?

""Yuan Ren[MSFT]"" wrote:

Show quoteHide quote
> Hi Philip,
>
> Thanks for your post!
>
> For the current issue, as far as I know, there is no interface of XML which
> can be accessed directly by using ODBC driver. If you want to use other
> applications (no .NET application) to access the XML data source, I think
> using XML SDK is a good way.
>
> In addition, you can import the XML data to SQL server and use the ODBC to
> access the SQL Server. Thanks for your understanding!
>
> Regards,
>
> Yuan Ren [MSFT]
> Microsoft Online Support
>
>
Author
20 Mar 2006 11:58 AM
Yuan Ren[MSFT]
Hi Philip,

Thanks for your reply!

If you use the SQL express, I suggest you save the data as MDF file. And
then, the client will use it conveniently. If the client has the office
component, you can also use the Access. It is easy to use as the desktop
data base engine. Thanks for your understanding!

Regards,

Yuan Ren [MSFT]
Microsoft Online Support
Author
20 Mar 2006 3:06 PM
Philip Wagenaar
Hi Yuan,

Thanks for your reply!

Why do you suggest saving the database as a mdf file? What is against using
ODBC driver for SQL to connect to the database?

""Yuan Ren[MSFT]"" wrote:

Show quoteHide quote
> Hi Philip,
>
> Thanks for your reply!
>
> If you use the SQL express, I suggest you save the data as MDF file. And
> then, the client will use it conveniently. If the client has the office
> component, you can also use the Access. It is easy to use as the desktop
> data base engine. Thanks for your understanding!
>
> Regards,
>
> Yuan Ren [MSFT]
> Microsoft Online Support
>
>
Author
21 Mar 2006 1:52 AM
Yuan Ren[MSFT]
Hi Philip,

Thanks for your reply!

I'm sorry maybe I have a little confusion about the current issue. I
thought you want to deploy the database to the client so that I suggested
you save the data base to the mdb file. If you deploy the data base to the
server, please use ODBC driver to connect the SQL data base freely. It's
OK. Thanks for your understanding!

Regards,

Yuan Ren [MSFT]
Microsoft Online Support
Author
21 Mar 2006 7:46 AM
Philip Wagenaar
I have several workstations throughout europe that will run an application.
This application can only connect to databases using ODBC connections wriiten
in plugins in vb6.

The data this application needs is inside several other systems throughout
europe that can be retrieved through xml requests to those applications.

My idea was to install SQL 2005 express on the workstations (localy). Then
write an application in VB.net that sends out the xml requests to the other
applications, receives/parses the data it gets back and places it in the SQL
2005 express database.

The application on the workstations can then locally connect to the SQL 2005
express database and query for the data its needs.

This is my task at hand.

What is the advantage in using mdf (ms access) files?
""Yuan Ren[MSFT]"" wrote:

Show quoteHide quote
> Hi Philip,
>
> Thanks for your reply!
>
> I'm sorry maybe I have a little confusion about the current issue. I
> thought you want to deploy the database to the client so that I suggested
> you save the data base to the mdb file. If you deploy the data base to the
> server, please use ODBC driver to connect the SQL data base freely. It's
> OK. Thanks for your understanding!
>
> Regards,
>
> Yuan Ren [MSFT]
> Microsoft Online Support
>
>
Author
21 Mar 2006 12:39 PM
Yuan Ren[MSFT]
Hi Philip,

Thank for your reply!

The solution seems OK. I think I have no additional comments about the
current issue. If you have any issues, please feel free to let me know.
It's my pleasure to be assistance.

Regards,

Yuan Ren [MSFT]
Microsoft Online Support