Aš jau visai pasimečiau. Radau instrukciją kaip perkelti duoemnis, bet kai ateinu iki DB struktūros ir paleidžiu "Taisyti" išmetė klaidą.Nemoku perskaityti kas neteisngai padaryta.
????
Klaidos duomenys:
Klaidos tekstas:
DataPortal.Update failed (System.Exception: Klaida transakcijoje vykdant SQL sakinį [INSERT INTO invoicesmade(ID, InvoiceSerial, InvoiceNumber, CurrencyCode, CurrencyRate, LanguageCode, VatExemptions, VatExemptionsAltLng, CustomInfo, CustomInfoAltLng, CommentsInternal, AddDateToNumberOptionWasUsed, NumbersInInvoice, AccountPayer, InsertDate, UpdateDate, InvoiceType, ExternalID, DocumentState) SELECT b.Op_ID, s.Serija, SUBSTRING(b.Op_Dok, LENGTH(s.Serija)+1), 'LTL', 1, 'LT', '', '', '', '', '', 0, 0, IFNULL(IF(f.ID IS NULL, d.Op_saskaita, 0), 0), UTC_TIMESTAMP(), UTC_TIMESTAMP(), 0, '', '' FROM bz b LEFT JOIN serijos s ON s.Serijos_dok='Sąskaita - faktūra' AND LOCATE(s.Serija, b.Op_Dok)=1 AND SUBSTRING(b.Op_Dok, LENGTH(s.Serija)+1,1) REGEXP '^[0-9]+$' LEFT JOIN bzdata d ON d.Op_tipas='Debetas' AND d.Op_ID_BZ=b.Op_ID LEFT JOIN sfd f ON f.SF_ID=b.Op_ID AND (f.S_Sas=d.Op_saskaita OR f.P_Sas=d.Op_saskaita) WHERE b.Op_dok_rusis='sf';], Params:
Klaidos turinys: 'Klaida vykdant SQL komandą: [INSERT INTO invoicesmade(ID, InvoiceSerial, InvoiceNumber, CurrencyCode, CurrencyRate, LanguageCode, VatExemptions, VatExemptionsAltLng, CustomInfo, CustomInfoAltLng, CommentsInternal, AddDateToNumberOptionWasUsed, NumbersInInvoice, AccountPayer, InsertDate, UpdateDate, InvoiceType, ExternalID, DocumentState) SELECT b.Op_ID, s.Serija, SUBSTRING(b.Op_Dok, LENGTH(s.Serija)+1), 'LTL', 1, 'LT', '', '', '', '', '', 0, 0, IFNULL(IF(f.ID IS NULL, d.Op_saskaita, 0), 0), UTC_TIMESTAMP(), UTC_TIMESTAMP(), 0, '', '' FROM bz b LEFT JOIN serijos s ON s.Serijos_dok='Sąskaita - faktūra' AND LOCATE(s.Serija, b.Op_Dok)=1 AND SUBSTRING(b.Op_Dok, LENGTH(s.Serija)+1,1) REGEXP '^[0-9]+$' LEFT JOIN bzdata d ON d.Op_tipas='Debetas' AND d.Op_ID_BZ=b.Op_ID LEFT JOIN sfd f ON f.SF_ID=b.Op_ID AND (f.S_Sas=d.Op_saskaita OR f.P_Sas=d.Op_saskaita) WHERE b.Op_dok_rusis='sf';], Params:
Klaidos turinys: 'Duplicate entry '14' for key 'PRIMARY''.'. ---> System.Exception: Klaida vykdant SQL komandą: [INSERT INTO invoicesmade(ID, InvoiceSerial, InvoiceNumber, CurrencyCode, CurrencyRate, LanguageCode, VatExemptions, VatExemptionsAltLng, CustomInfo, CustomInfoAltLng, CommentsInternal, AddDateToNumberOptionWasUsed, NumbersInInvoice, AccountPayer, InsertDate, UpdateDate, InvoiceType, ExternalID, DocumentState) SELECT b.Op_ID, s.Serija, SUBSTRING(b.Op_Dok, LENGTH(s.Serija)+1), 'LTL', 1, 'LT', '', '', '', '', '', 0, 0, IFNULL(IF(f.ID IS NULL, d.Op_saskaita, 0), 0), UTC_TIMESTAMP(), UTC_TIMESTAMP(), 0, '', '' FROM bz b LEFT JOIN serijos s ON s.Serijos_dok='Sąskaita - faktūra' AND LOCATE(s.Serija, b.Op_Dok)=1 AND SUBSTRING(b.Op_Dok, LENGTH(s.Serija)+1,1) REGEXP '^[0-9]+$' LEFT JOIN bzdata d ON d.Op_tipas='Debetas' AND d.Op_ID_BZ=b.Op_ID LEFT JOIN sfd f ON f.SF_ID=b.Op_ID AND (f.S_Sas=d.Op_saskaita OR f.P_Sas=d.Op_saskaita) WHERE b.Op_dok_rusis='sf';], Params:
Klaidos turinys: 'Duplicate entry '14' for key 'PRIMARY''. ---> MySql.Data.MySqlClient.MySqlException: Duplicate entry '14' for key 'PRIMARY'
at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId)
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
at AccDataAccessLayer.SqlServerSpecificMethods.MySqlCommandManager.ExecuteCommand(SQLCommand CommandToExecute, Int32& RowsAffected)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at AccDataAccessLayer.SqlServerSpecificMethods.MySqlCommandManager.TransactionRollBack(Exception e)
at AccDataAccessLayer.SqlServerSpecificMethods.MySqlCommandManager.ExecuteCommand(SQLCommand CommandToExecute, Int32& RowsAffected)
at AccDataAccessLayer.DatabaseAccess.SQLUtilities.ExecuteCommand(SQLCommand CommandToExecute, Int32& RowsAffected)
at AccDataAccessLayer.DatabaseAccess.SQLCommand.Execute()
at ApskaitaObjects.CustomDatabaseStructureErrorManager.UpgradeOldVersionInvoicesMade(DatabaseStructureErrorList& StructureErrorList)
at ApskaitaObjects.CustomDatabaseStructureErrorManager.RepairCustomError(DatabaseStructureErrorList& StructureErrorList, DatabaseStructureError CustomError)
at AccDataAccessLayer.DatabaseAccess.DatabaseStructure.DatabaseStructureError.Update(DatabaseStructureErrorList& parent)
at AccDataAccessLayer.DatabaseAccess.DatabaseStructure.DatabaseStructureErrorList.DataPortal_Update())
Klaidos šaltinis(Ex.Source):
Csla
Klaidos metodas (Ex.TargetSite):
Update
Klaidos stekas:
at AccDataAccessLayer.SqlServerSpecificMethods.MySqlCommandManager.TransactionRollBack(Exception e)
at AccDataAccessLayer.SqlServerSpecificMethods.MySqlCommandManager.ExecuteCommand(SQLCommand CommandToExecute, Int32& RowsAffected)
at AccDataAccessLayer.DatabaseAccess.SQLUtilities.ExecuteCommand(SQLCommand CommandToExecute, Int32& RowsAffected)
at AccDataAccessLayer.DatabaseAccess.SQLCommand.Execute()
at ApskaitaObjects.CustomDatabaseStructureErrorManager.UpgradeOldVersionInvoicesMade(DatabaseStructureErrorList& StructureErrorList)
at ApskaitaObjects.CustomDatabaseStructureErrorManager.RepairCustomError(DatabaseStructureErrorList& StructureErrorList, DatabaseStructureError CustomError)
at AccDataAccessLayer.DatabaseAccess.DatabaseStructure.DatabaseStructureError.Update(DatabaseStructureErrorList& parent)
at AccDataAccessLayer.DatabaseAccess.DatabaseStructure.DatabaseStructureErrorList.DataPortal_Update()
at Csla.MethodCaller.CallMethod(Object obj, MethodInfo info, Object[] parameters)
at Csla.MethodCaller.CallMethod(Object obj, String method, Object[] parameters)
at Csla.Server.SimpleDataPortal.Update(Object obj, DataPortalContext context)
at Csla.DataPortal.Update(Object obj)
at Csla.DataPortal.Update[T](T obj)
at Csla.BusinessListBase`2.Save()
at AccDataAccessLayer.DatabaseAccess.DatabaseStructure.DatabaseStructureErrorList.Save()
at ApskaitaWUI.F_DatabaseStructureError.RepairErrorsButton_Click(Object sender, EventArgs e)
----------------------------
Vidinės klaidos (internal exception) duomenys:
Klaidos tekstas:
DataPortal_Update method call failed
Klaidos šaltinis(Ex.Source):
Csla
Klaidos metodas (Ex.TargetSite):
CallMethod
Klaidos stekas:
at AccDataAccessLayer.SqlServerSpecificMethods.MySqlCommandManager.TransactionRollBack(Exception e)
at AccDataAccessLayer.SqlServerSpecificMethods.MySqlCommandManager.ExecuteCommand(SQLCommand CommandToExecute, Int32& RowsAffected)
at AccDataAccessLayer.DatabaseAccess.SQLUtilities.ExecuteCommand(SQLCommand CommandToExecute, Int32& RowsAffected)
at AccDataAccessLayer.DatabaseAccess.SQLCommand.Execute()
at ApskaitaObjects.CustomDatabaseStructureErrorManager.UpgradeOldVersionInvoicesMade(DatabaseStructureErrorList& StructureErrorList)
at ApskaitaObjects.CustomDatabaseStructureErrorManager.RepairCustomError(DatabaseStructureErrorList& StructureErrorList, DatabaseStructureError CustomError)
at AccDataAccessLayer.DatabaseAccess.DatabaseStructure.DatabaseStructureError.Update(DatabaseStructureErrorList& parent)
at AccDataAccessLayer.DatabaseAccess.DatabaseStructure.DatabaseStructureErrorList.DataPortal_Update()
at Csla.MethodCaller.CallMethod(Object obj, MethodInfo info, Object[] parameters)
at Csla.MethodCaller.CallMethod(Object obj, String method, Object[] parameters)
at Csla.Server.SimpleDataPortal.Update(Object obj, DataPortalContext context)
----------------------------
Vidinės klaidos (internal exception) duomenys:
Klaidos tekstas:
Klaida transakcijoje vykdant SQL sakinį [INSERT INTO invoicesmade(ID, InvoiceSerial, InvoiceNumber, CurrencyCode, CurrencyRate, LanguageCode, VatExemptions, VatExemptionsAltLng, CustomInfo, CustomInfoAltLng, CommentsInternal, AddDateToNumberOptionWasUsed, NumbersInInvoice, AccountPayer, InsertDate, UpdateDate, InvoiceType, ExternalID, DocumentState) SELECT b.Op_ID, s.Serija, SUBSTRING(b.Op_Dok, LENGTH(s.Serija)+1), 'LTL', 1, 'LT', '', '', '', '', '', 0, 0, IFNULL(IF(f.ID IS NULL, d.Op_saskaita, 0), 0), UTC_TIMESTAMP(), UTC_TIMESTAMP(), 0, '', '' FROM bz b LEFT JOIN serijos s ON s.Serijos_dok='Sąskaita - faktūra' AND LOCATE(s.Serija, b.Op_Dok)=1 AND SUBSTRING(b.Op_Dok, LENGTH(s.Serija)+1,1) REGEXP '^[0-9]+$' LEFT JOIN bzdata d ON d.Op_tipas='Debetas' AND d.Op_ID_BZ=b.Op_ID LEFT JOIN sfd f ON f.SF_ID=b.Op_ID AND (f.S_Sas=d.Op_saskaita OR f.P_Sas=d.Op_saskaita) WHERE b.Op_dok_rusis='sf';], Params:
Klaidos turinys: 'Klaida vykdant SQL komandą: [INSERT INTO invoicesmade(ID, InvoiceSerial, InvoiceNumber, CurrencyCode, CurrencyRate, LanguageCode, VatExemptions, VatExemptionsAltLng, CustomInfo, CustomInfoAltLng, CommentsInternal, AddDateToNumberOptionWasUsed, NumbersInInvoice, AccountPayer, InsertDate, UpdateDate, InvoiceType, ExternalID, DocumentState) SELECT b.Op_ID, s.Serija, SUBSTRING(b.Op_Dok, LENGTH(s.Serija)+1), 'LTL', 1, 'LT', '', '', '', '', '', 0, 0, IFNULL(IF(f.ID IS NULL, d.Op_saskaita, 0), 0), UTC_TIMESTAMP(), UTC_TIMESTAMP(), 0, '', '' FROM bz b LEFT JOIN serijos s ON s.Serijos_dok='Sąskaita - faktūra' AND LOCATE(s.Serija, b.Op_Dok)=1 AND SUBSTRING(b.Op_Dok, LENGTH(s.Serija)+1,1) REGEXP '^[0-9]+$' LEFT JOIN bzdata d ON d.Op_tipas='Debetas' AND d.Op_ID_BZ=b.Op_ID LEFT JOIN sfd f ON f.SF_ID=b.Op_ID AND (f.S_Sas=d.Op_saskaita OR f.P_Sas=d.Op_saskaita) WHERE b.Op_dok_rusis='sf';], Params:
Klaidos turinys: 'Duplicate entry '14' for key 'PRIMARY''.'.
Klaidos šaltinis(Ex.Source):
AccDataAccessLayer
Klaidos metodas (Ex.TargetSite):
TransactionRollBack
Klaidos stekas:
at AccDataAccessLayer.SqlServerSpecificMethods.MySqlCommandManager.TransactionRollBack(Exception e)
at AccDataAccessLayer.SqlServerSpecificMethods.MySqlCommandManager.ExecuteCommand(SQLCommand CommandToExecute, Int32& RowsAffected)
at AccDataAccessLayer.DatabaseAccess.SQLUtilities.ExecuteCommand(SQLCommand CommandToExecute, Int32& RowsAffected)
at AccDataAccessLayer.DatabaseAccess.SQLCommand.Execute()
at ApskaitaObjects.CustomDatabaseStructureErrorManager.UpgradeOldVersionInvoicesMade(DatabaseStructureErrorList& StructureErrorList)
at ApskaitaObjects.CustomDatabaseStructureErrorManager.RepairCustomError(DatabaseStructureErrorList& StructureErrorList, DatabaseStructureError CustomError)
at AccDataAccessLayer.DatabaseAccess.DatabaseStructure.DatabaseStructureError.Update(DatabaseStructureErrorList& parent)
at AccDataAccessLayer.DatabaseAccess.DatabaseStructure.DatabaseStructureErrorList.DataPortal_Update()
----------------------------
Vidinės klaidos (internal exception) duomenys:
Klaidos tekstas:
Klaida vykdant SQL komandą: [INSERT INTO invoicesmade(ID, InvoiceSerial, InvoiceNumber, CurrencyCode, CurrencyRate, LanguageCode, VatExemptions, VatExemptionsAltLng, CustomInfo, CustomInfoAltLng, CommentsInternal, AddDateToNumberOptionWasUsed, NumbersInInvoice, AccountPayer, InsertDate, UpdateDate, InvoiceType, ExternalID, DocumentState) SELECT b.Op_ID, s.Serija, SUBSTRING(b.Op_Dok, LENGTH(s.Serija)+1), 'LTL', 1, 'LT', '', '', '', '', '', 0, 0, IFNULL(IF(f.ID IS NULL, d.Op_saskaita, 0), 0), UTC_TIMESTAMP(), UTC_TIMESTAMP(), 0, '', '' FROM bz b LEFT JOIN serijos s ON s.Serijos_dok='Sąskaita - faktūra' AND LOCATE(s.Serija, b.Op_Dok)=1 AND SUBSTRING(b.Op_Dok, LENGTH(s.Serija)+1,1) REGEXP '^[0-9]+$' LEFT JOIN bzdata d ON d.Op_tipas='Debetas' AND d.Op_ID_BZ=b.Op_ID LEFT JOIN sfd f ON f.SF_ID=b.Op_ID AND (f.S_Sas=d.Op_saskaita OR f.P_Sas=d.Op_saskaita) WHERE b.Op_dok_rusis='sf';], Params:
Klaidos turinys: 'Duplicate entry '14' for key 'PRIMARY''.
----------------------------
Vidinės klaidos (internal exception) duomenys:
Klaidos tekstas:
Duplicate entry '14' for key 'PRIMARY'
Klaidos šaltinis(Ex.Source):
MySql.Data
Klaidos metodas (Ex.TargetSite):
OpenPacket
Klaidos stekas:
at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId)
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
at AccDataAccessLayer.SqlServerSpecificMethods.MySqlCommandManager.ExecuteCommand(SQLCommand CommandToExecute, Int32& RowsAffected)