Easysoft
ODBC Drivers for Oracle, SQL Server, Firebird, ISAM, InterBase, Sybase, MS Access & more.

Easysoft XML-ODBC Server

How do I access ODBC databases from an ASP running under IIS with XML?

Article : 00950
Last Reviewed : 18th August 2006
Revision : 1

Our customers are using the Easysoft XML-ODBC Server to access ODBC databases from an Active Server Page (ASP) on Internet Information Server (IIS) by using XML requests.

Register with us now to download a fully functional free trial version of the Easysoft XML-ODBC Server.

To use XML to access ODBC databases from an ASP running under IIS:

  1. Install the Easysoft XML-ODBC Server and create a System ODBC data source for the target database. Test that you can access the data source with one of the XML-ODBC Server sample clients included in the distribution.

    For information about how to do this, see the Easysoft XML-ODBC Server documentation.

  2. Copy xmlodbc.dll from InstallDir/XML-ODBC Server/Clients/VB on the machine running the Easysoft XML-ODBC Server to your Windows System32 directory.

    Replace InstallDir with the Easysoft XML-ODBC Server installation directory, by default, /Program Files/Easysoft on Windows and /usr/local/easysoft on UNIX.

  3. At the MS-DOS prompt, register xmlodbc.dll:
    regsvr32 %WINDIR%\System32\xmlodbc.dll

    To get help with registering DLLs, type:

    regsvr32
  4. Create a file named xmldemo.asp under the IIS WWWRoot directory:
    <%
    set xmlODBC=Server.CreateObject("Easysoft_XML_ODBC.xmlODBC")
    
    xmlODBC.Server = "my_xml_server_hostname"
    xmlODBC.Port = 8895
    txtDSN = "DSN=my_system_dsn"
    txtSQL = "select * from my_table"
    
    If Not xmlODBC.Connect Then
        response.write "Connect Error : " & xmlODBC.ErrorState _
            & " : " & xmlODBC.ErrorText
    End If
    
    xmlODBC.Execute txtSQL, txtDSN
    If Len(xmlODBC.RawData) < 1 Then
        response.write "SQL Error : " xmlODBC.ErrorState _
            & " : " & xmlODBC.ErrorText
    End If
    
    response.write xmlODBC.RawData
    xmlODBC.Disconnect
    %>
    

    Replace my_xml_server_hostname with the name of the machine on which the XML-ODBC Server is running. Replace my_system_dsn with the name of your System data source on the XML-ODBC Server machine. Replace the txtSQL value with a valid SQL statement.

    For more information about the properties, collections and methods that xmlodbc.dll contains, see InstallDir/XML-ODBC Server/Clients/VB/README.txt.

Applies To

Knowledge Base Feedback

* Did this content help you?
Yes
No
Maybe
 
* Please select one option based on your first choice:
I'm very satisfied
I think it will help, but I haven't tried it yet
It is helpful, but I need more information
It is helpful, but hard to understand
Seemed relevant in search results, but didn't help me
The information is incorrect
The page contains one or more broken links
 
  Suggest new content or let us know how we can improve this content:

 
  (* Required Fields)   



© 1993 - 2008 Easysoft Limited. All rights reserved.