Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird message on SQL command
Message
From
21/09/2006 20:01:36
 
 
To
All
General information
Forum:
ASP.NET
Category:
Databases
Title:
Weird message on SQL command
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01156234
Message ID:
01156234
Views:
89
I have this message:

"Invalid path or file name."

on this SQL:
SELECT Style.Numero,Style.Title_E AS Title,Style.Trans_E,Style.Trans_F,;
 Country.Title_E AS Country,Style.DateCrea_E,Style.DateCrea_F,Style.NoMaster,Style.AddName_E,Style.AddName_F,;
 Style.NoStyle,Style.NoStyle2,Style.NoMaster2,Style.NoCountry,Style.WikiUrl_E,Style.WikiUrl_F,Style.WikiTitl_E,;
 Style.WikiTitl_F,IIF(ISNULL(StyleDefinition.Notes_E),"",StyleDefinition.Notes_E) AS Notes_E,;
 IIF(ISNULL(StyleDefinition.Notes_F),"",StyleDefinition.Notes_F) AS Notes_F,Style.Url;
 FROM Style;
 LEFT JOIN StyleDefinition ON Style.Numero=StyleDefinition.NoStyle AND StyleDefinition.NoStyleC=1;
 LEFT JOIN Country ON Style.NoCountry=Country.Numero;
 ORDER BY Title
Anyone would know what could cause this message on this SQL? If I execute this SQL as is, it works. But, today, at one occasion, I got this error.

This is done in VB.NET by the use of OleDb provider to query VFP data.

This is the stack trace:

at System.Data.OleDb.OleDbCommand.ExecuteTableDirect(CommandBehavior behavior, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Framework.Framework.Data.SQLExec(String tcSQL, String tcConnection)

This is the code section which triggered it:
            Try
                oCommand.Connection = oConnection

                ' Add all command text
                If oCommandText.Count > 0 Then
                    oCommand.Connection.Open()
                    For Each lcCommandText In oCommandText
                        oCommand.CommandText = lcCommandText
                        oCommand.ExecuteNonQuery()
                    Next
                End If

                oCommand.CommandText = tcSQL

                ' Only add the parameters if we have some
                If Not oParameters2 Is Nothing Then
                    For Each oDataParameter In oParameters2
                        oCommand.Parameters.Add(oDataParameter)
                    Next
                End If

                oDataAdapter.SelectCommand = oCommand
                oDataSet = New DataSet

                ' By default, .NET does not add the specific field length, which is needed in XML as at the other end
                ' someone would always get memo field instead of character field
                oDataAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey

                oDataAdapter.Fill(oDataSet)

                ' If we have a command text
                If oCommandText.Count > 0 Then
                    oCommand.Connection.Close()

                    ' Clear the command text collection
                    oCommandText.Clear()

                End If

                ' Adjust to our default name
                oDataSet.Tables("Table").TableName = "Temp"

                ' Record count
                nCount = oDataSet.Tables("Temp").Rows.Count

                ' If we have at least one record
                If nCount > 0 Then
                    oDataView = New DataView
                    oDataView = oDataSet.Tables("Temp").DefaultView
                End If

                ' Clear the parameter collection
                If oParameters2.Count > 0 Then
                    oParameters.Clear()
                    oParameters2.Clear()
                End If

                llSuccess = True
            Catch loError As Exception
                oConnection.Close()

                ' Get the proper definition as per the current scope
                If oProcess Is Nothing Then
                    oApp.ErrorSetup(loError, oApp.Debug(cSQL + ErrorDetail()))
                Else
                    oProcess.ErrorSetup(loError, oApp.Debug(cSQL + ErrorDetail()))
                End If

            End Try
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
Next
Reply
Map
View

Click here to load this message in the networking platform