Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SaveDataSet(tablename, rowIndex) fails after upgrading
Message
From
27/07/2004 14:39:29
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
SaveDataSet(tablename, rowIndex) fails after upgrading
Miscellaneous
Thread ID:
00928422
Message ID:
00928422
Views:
51
I had an service (MyService) that needed a minor change (change the value of a string that it prints).

All the program does is get a DataSet from a database using a stored procedure with one parameter (number of records to get). The stored procedure uses a temp table called "##TempTable". I did not make any change to the stored procedure which has been working without incident.

After MyService processes each record, it calls
OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet("tableName", rowIndex)
to update the database.

After I installed the newest version of Mere Mortals, I could build, install, and run the service, but but SaveDataSet method caused an exception to be thrown.

I don't know how to step through code in a Service to debug it. From the error stack below, it seems like the problem is in the new MM code. (Error message from my server machine's Event Viewer.)

The description for Event ID ( 0 ) in Source ( MyService ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event:

Invalid object name '##TempTable'. at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.CommandBuilder.BuildCache(Boolean closeConnection)
at System.Data.SqlClient.SqlCommandBuilder.GetInsertCommand()
at OakLeaf.MM.Main.Data.mmDataAccessSql.CreateInsertCommand()
at OakLeaf.MM.Main.Data.mmDataAccessSql.SaveDataSet(DataSet ds, String tableName, String primaryKeyName, Boolean retrieveAutoIncrementPK, IDbDataAdapter dbAdapter)
at OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(DataSet ds, String tableName, String databaseKey, IDbDataAdapter dbAdapter)
at OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(DataSet ds, String tableName, String databaseKey)
at OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(DataSet ds, String tableName)
at OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(String tableName, Int32 currentRow)
at MyService.MyService.DoEvent()
at MyService.MyService.timer1_Elapsed(Object sender, ElapsedEventArgs e).

(The programmer who originally designed the code made the namespace and class name the same.)

I suspect that if I reverted to the previous version of MM, I could get it to work, but I don't really want to support two versions.

Does anyone have any idea what the problem is, if this is a bug, or even just the best way to debug and trace services? Any suggestions would be appreciated.
David S. Alexander
Kettley Publishing
20271 SW Birch Street, 2nd Floor
Newport Beach, CA 92660-1752
Next
Reply
Map
View

Click here to load this message in the networking platform