G
Guest
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAM¬S
dbParams, Object& executeResult)
I have an application that is in production and being used by many
people. I received a support email a couple of days ago, and I have
been racking my brain over what may be causing the issue. It seems
that the error I am getting is a pretty common error that applies for
almost anything. I am looking for any guidance on what may be
causing
this error.
Here is a little background on my program that may help in resolving
the issue.
My program has an embedded mdb file as a resource. When the user
starts up my app it extracts that embedded resource and creates an
"untitled#.mdb" file in the last use folder. So at this point I know
that the user who is running the application has the sufficient access
to write and modify files in the folder which my application writes
out this new file. Next my program connects to the database and makes
a select call on one of the tables that is in the database. In the
case of the user who is experiencing problems with my app the select
call works. So at this point I am pretty sure that my application is
able to write out a the mdb file, connect to the mdb file, and perform
an SQL query on the file. Now when the program tries to perform any
Insert or Delete queries in my application it fails and I get the
error above.
I can not reproduce the error at all, which makes me believe that it
is not any type of syntax error. I also have never seen this type of
behavior on any computer that my software has ever
been installed on. Does anyone know what the problem may be, or have
any suggestions on how I could go about trying to find out?
Here is a copy of my DB function.
Friend Sub PerformAction(ByVal SQLCommand As String, ByVal
CommandObject As OleDbCommand)
Call m_logger.Debug("Begin PerformAction(ByVal SQLCommand As
String, ByVal CommandObject As OleDbCommand)")
Try
CommandObject.CommandText = SQLCommand
Call m_logger.Debug(SQLCommand)
CommandObject.ExecuteNonQuery()
Catch ex As Exception
m_logger.Fatal("ex.Message = " + ex.Message +
"ex.StackTrace = " + ex.StackTrace + " SQLCommand = " + SQLCommand)
End Try
Call m_logger.Debug("End PerformAction(ByVal SQLCommand As
String, ByVal CommandObject As OleDbCommand)")
End Sub
This is what gets put out to my log.
2007-02-28 06:55:09,000 [3364] (144622) DEBUG fcmFlashcardManager -
Begin PerformAction(ByVal SQLCommand As String, ByVal DbConnection As
OleDbConnection)
2007-02-28 06:55:09,000 [3364] (144622) DEBUG fcmFlashcardManager -
Insert into [KeyPlacement]([FlashcardID], [NextFlashcardID]) VALUES
('START','2dd746b3-b80e-4ff8-9cc3-1e72141ecc97')
2007-02-28 06:55:09,016 [3364] (144637) FATAL fcmFlashcardManager -
ex.Message = Unknownex.StackTrace = at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAM¬S
dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(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.ExecuteNonQuery()
at FlashcardManager.xdc76805d00b2a72d.xd170ced8774bc454(String
x24d48be70b20c549, OleDbConnection x5120ced92b5061d3) SQLCommand =
Insert into [KeyPlacement]([FlashcardID], [NextFlashcardID]) VALUES
('START','2dd746b3-b80e-4ff8-9cc3-1e72141ecc97')
2007-02-28 06:55:09,016 [3364] (144637) DEBUG fcmFlashcardManager -
End PerformAction(ByVal SQLCommand As String, ByVal DbConnection As
OleDbConnection)
dbParams, Object& executeResult)
I have an application that is in production and being used by many
people. I received a support email a couple of days ago, and I have
been racking my brain over what may be causing the issue. It seems
that the error I am getting is a pretty common error that applies for
almost anything. I am looking for any guidance on what may be
causing
this error.
Here is a little background on my program that may help in resolving
the issue.
My program has an embedded mdb file as a resource. When the user
starts up my app it extracts that embedded resource and creates an
"untitled#.mdb" file in the last use folder. So at this point I know
that the user who is running the application has the sufficient access
to write and modify files in the folder which my application writes
out this new file. Next my program connects to the database and makes
a select call on one of the tables that is in the database. In the
case of the user who is experiencing problems with my app the select
call works. So at this point I am pretty sure that my application is
able to write out a the mdb file, connect to the mdb file, and perform
an SQL query on the file. Now when the program tries to perform any
Insert or Delete queries in my application it fails and I get the
error above.
I can not reproduce the error at all, which makes me believe that it
is not any type of syntax error. I also have never seen this type of
behavior on any computer that my software has ever
been installed on. Does anyone know what the problem may be, or have
any suggestions on how I could go about trying to find out?
Here is a copy of my DB function.
Friend Sub PerformAction(ByVal SQLCommand As String, ByVal
CommandObject As OleDbCommand)
Call m_logger.Debug("Begin PerformAction(ByVal SQLCommand As
String, ByVal CommandObject As OleDbCommand)")
Try
CommandObject.CommandText = SQLCommand
Call m_logger.Debug(SQLCommand)
CommandObject.ExecuteNonQuery()
Catch ex As Exception
m_logger.Fatal("ex.Message = " + ex.Message +
"ex.StackTrace = " + ex.StackTrace + " SQLCommand = " + SQLCommand)
End Try
Call m_logger.Debug("End PerformAction(ByVal SQLCommand As
String, ByVal CommandObject As OleDbCommand)")
End Sub
This is what gets put out to my log.
2007-02-28 06:55:09,000 [3364] (144622) DEBUG fcmFlashcardManager -
Begin PerformAction(ByVal SQLCommand As String, ByVal DbConnection As
OleDbConnection)
2007-02-28 06:55:09,000 [3364] (144622) DEBUG fcmFlashcardManager -
Insert into [KeyPlacement]([FlashcardID], [NextFlashcardID]) VALUES
('START','2dd746b3-b80e-4ff8-9cc3-1e72141ecc97')
2007-02-28 06:55:09,016 [3364] (144637) FATAL fcmFlashcardManager -
ex.Message = Unknownex.StackTrace = at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAM¬S
dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(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.ExecuteNonQuery()
at FlashcardManager.xdc76805d00b2a72d.xd170ced8774bc454(String
x24d48be70b20c549, OleDbConnection x5120ced92b5061d3) SQLCommand =
Insert into [KeyPlacement]([FlashcardID], [NextFlashcardID]) VALUES
('START','2dd746b3-b80e-4ff8-9cc3-1e72141ecc97')
2007-02-28 06:55:09,016 [3364] (144637) DEBUG fcmFlashcardManager -
End PerformAction(ByVal SQLCommand As String, ByVal DbConnection As
OleDbConnection)