Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Who really uses the VFPOleDB.1 provider?
Message
From
06/10/2006 18:24:53
 
 
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01158763
Message ID:
01160262
Views:
22
I have adjusted the test page like this:
<%@ Page Language="VB" AutoEventWireup="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
    Sub Page_Error(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Error
        CreateFile(Server.GetLastError().GetBaseException().Message, "d:\iis\direct martial arts\Temp\Error" + Date.Now.Ticks.ToString + ".txt")
    End Sub

    Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim loLXDataProvider As LXDataProvider.LXDataProvider = New LXDataProvider.LXDataProvider()
        Dim loDataSet As System.Data.DataSet
        Dim loRow As System.Data.DataRow
        loDataSet = loLXDataProvider.DataProvider("SELECT Video.Numero FROM Video " + _
         "INNER JOIN Masters ON Video.NoMaster=Masters.Numero " + _
         "INNER JOIN VideoType ON Video.NoVideoT=VideoType.Numero " + _
         "INNER JOIN VideoLanguage ON Video.NoVideoL=VideoLanguage.Numero " + _
         "INNER JOIN VideoClassification ON Video.NoClass=VideoClassification.Numero " + _
         "INNER JOIN VideoSize ON Video.NoVideoSiz=VideoSize.Numero " + _
         "WHERE Video.Active2 AND Video.Numero=21 ORDER BY Video.VideoT")
        loRow = loDataSet.Tables("Temp").Rows(0)
        Exit Sub
        
        Dim oDataSet As System.Data.DataSet = New System.Data.DataSet
        Dim lcSQL As String = "SELECT Video.Numero FROM Video " + _
         "INNER JOIN Masters ON Video.NoMaster=Masters.Numero " + _
         "INNER JOIN VideoType ON Video.NoVideoT=VideoType.Numero " + _
         "INNER JOIN VideoLanguage ON Video.NoVideoL=VideoLanguage.Numero " + _
         "INNER JOIN VideoClassification ON Video.NoClass=VideoClassification.Numero " + _
         "INNER JOIN VideoSize ON Video.NoVideoSiz=VideoSize.Numero " + _
         "WHERE Video.Active2 AND Video.Numero=21 ORDER BY Video.VideoT"
        Dim oDataAdapter As System.Data.OleDb.OleDbDataAdapter = New System.Data.OleDb.OleDbDataAdapter(lcSQL, _
         "Provider=VFPOLEDB.1;Data Source=""d:\iis\Direct Martial Arts\App_Data"";Collating Sequence=general")
        oDataAdapter.Fill(oDataSet)
        oDataAdapter.Dispose()
    End Sub

    Private Function CreateFile(ByVal tcString As String, ByVal tcFile As String) As Boolean
        Dim loFileStream As System.IO.FileStream
        Dim loStreamWriter As IO.StreamWriter
        loFileStream = New System.IO.FileStream(tcFile, System.IO.FileMode.Create)
        loStreamWriter = New System.IO.StreamWriter(loFileStream, System.Text.Encoding.Default)
        loStreamWriter.Write(tcString)
        loStreamWriter.Close()
        loFileStream.Close()
        Return True
    End Function
</script>

<html> 
<body> 
<asp:Label ID="Header2" runat="server" Text=""></asp:Label>
<asp:Label ID="Html" runat="server" Text=""></asp:Label>
<asp:Label ID="Footer" runat="server" Text=""></asp:Label>
</body>
</html>
The loLXDataProvider object is a reference to Level Extreme Web Service Data Provider. So, in this test page, I simply pass the same SQL command into a Web Service. The Web Service is as follow:
        ' Execute a SQL command
        ' expC1 SQL command
        <WebMethod()> _
        Public Function DataProvider(ByVal tcSQL As String) As DataSet
            Dim loDataProvider As Framework.Framework.Data = New Framework.Framework.Data(oApp)
            If Not loDataProvider.SQLExec(tcSQL, oApp.aConnection(1)) Then
                Throw New System.Exception(oApp.cError)
            End If
            Return loDataProvider.oDataSet
        End Function
The process is running three times slower because of this additional layer. The result is the same. After a while, I get some errors. But, when I thought more about it, this is under the same condition. We are still under .NET, using the VFPOleDb provider and the Web Service is bound the IIS infrastructure. So, my initial assumption is still valid. Within those conditions, the VFPOleDb provider cannot deliver the result.

The next step is to change the Web Service approach into one that would be VFP native. Such design would imply West Wind.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform