ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Cannot update the cursor
-
Hi dear, i face a problem here, use asp.net with c#.... conConnectionOTHER= new OdbcConnection( "PWD=; SourceType=DBC;DSN=payroll;Collate=Machine;Deleted=Yes;BackgroundFetch=Yes;Exclusive=Yes; SourceDB=C:\\payroll\\data\\myapp.dbc;Null=Yes;UID="); ======================================================================================= //Success conConnectionOTHER.Open(); OdbcCommand cmdGetHistory; OdbcDataReader dtrGetHistory; string strGetHistory="select * from sol where employeeid='000007'"; cmdGetHistory=new OdbcCommand(strGetHistory,conConnectionOTHER); dtrGetHistory=cmdGetHistory.ExecuteReader(); DataGrid2.DataSource=dtrGetHistory; DataGrid2.DataBind(); conConnectionOTHER.Close(); //end Result is success, it can bind and show in data grid ====================================================================================== //Fail Here conConnectionOTHER.Open(); OdbcCommand cmdUpdate; string strUpdate="Update sol set type='LEA' where employeeid='000007'"; cmdUpdate=new OdbcCommand(strUpdate,conConnectionOTHER); cmdUpdate.ExecuteNonQuery(); conConnectionOTHER.Close(); //end Result is fail, cannot update record Server Error in '/linkToPayroll' Application. -------------------------------------------------------------------------------- ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Cannot update the cursor. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.Odbc.OdbcException: ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Cannot update the cursor. Source Error: Line 37: string strUpdate="Update sol set type='LEA' where employeeid='000007'"; Line 38: cmdUpdate=new OdbcCommand(strUpdate,conConnectionOTHER); Line 39: cmdUpdate.ExecuteNonQuery(); Line 40: conConnectionOTHER.Close(); Line 41: Source File: c:\inetpub\wwwroot\linktopayroll\webform1.aspx.cs Line: 39 ======================================================================================== Please need your guideline.......help Thank you very much from : eva
-
Hi dear, i face a problem here, use asp.net with c#.... conConnectionOTHER= new OdbcConnection( "PWD=; SourceType=DBC;DSN=payroll;Collate=Machine;Deleted=Yes;BackgroundFetch=Yes;Exclusive=Yes; SourceDB=C:\\payroll\\data\\myapp.dbc;Null=Yes;UID="); ======================================================================================= //Success conConnectionOTHER.Open(); OdbcCommand cmdGetHistory; OdbcDataReader dtrGetHistory; string strGetHistory="select * from sol where employeeid='000007'"; cmdGetHistory=new OdbcCommand(strGetHistory,conConnectionOTHER); dtrGetHistory=cmdGetHistory.ExecuteReader(); DataGrid2.DataSource=dtrGetHistory; DataGrid2.DataBind(); conConnectionOTHER.Close(); //end Result is success, it can bind and show in data grid ====================================================================================== //Fail Here conConnectionOTHER.Open(); OdbcCommand cmdUpdate; string strUpdate="Update sol set type='LEA' where employeeid='000007'"; cmdUpdate=new OdbcCommand(strUpdate,conConnectionOTHER); cmdUpdate.ExecuteNonQuery(); conConnectionOTHER.Close(); //end Result is fail, cannot update record Server Error in '/linkToPayroll' Application. -------------------------------------------------------------------------------- ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Cannot update the cursor. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.Odbc.OdbcException: ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Cannot update the cursor. Source Error: Line 37: string strUpdate="Update sol set type='LEA' where employeeid='000007'"; Line 38: cmdUpdate=new OdbcCommand(strUpdate,conConnectionOTHER); Line 39: cmdUpdate.ExecuteNonQuery(); Line 40: conConnectionOTHER.Close(); Line 41: Source File: c:\inetpub\wwwroot\linktopayroll\webform1.aspx.cs Line: 39 ======================================================================================== Please need your guideline.......help Thank you very much from : eva