Updating Datasets

Hi,
I am new to .net environment and odp.net.
I installed Oracle Express Edition and Visual Basic 2005 Express Edition.
I tried to update dataset. But Iam getting error as
'Concurrency violatation : affected 0 records expected 1 records'
code i used
Namespace : system.oracle.dataaccess.
dim ds as dataset
cn=new oracle.dataaccess.client.oracleconnection(cnstr)
daCustomers= new oracledataadapter("Select * from Customers Order By Name",cn)
cmbCustomers=new oraclecommandbuilder(dacustomers)
da.tablemappings.add("CUSTOMERS","CUSTOMERS")
da.insertcommand=cmbcustomers.getinsertcommand
da.updatecommand=cmbcustomers.getupdatecommand
da.deletecommand=cmbcustomers.getdeletecommand
da.fill(ds,"CUSTOMERS")
in the updating procedure
dim dv as dataview
dv.rowfilter="CUSTID=" & someid
if dv.count > 0 then
dv(fieldnames...)=field values..
end if
dacustomers.update(ds.tables("CUSTOMERS"))
for the first time when I try to insert or update , it works well.
for the second time when i try to insert or update. I am getting the error as like.
without commandbuilder.getinsertcommand,getupdatecommand,getdeletecommand
these lines doesn't TOTALLY working.
I seen the odp.net, it has given a very simple neat example. but according to that it is not working.
in the table i have a primary key column custid.
is any other thing has to be installed in the system.( In my system an error comes like this. when I take an adapter and placed error comes as guid 000-00000000-000-0000 cannot access.).
Any Suggestion,help !. Please
Thx in advance

Hello,
In My system the .net framework configuration shows
Oracle.DataAccess - 2.102.2.1
oracle.dataaccess - 1.102.2.1
oracle.dataaccess - 10.2.0.1
Warning     1
Referenced assembly 'D:\oracle\product\10.2.0\client_1\odp.net\bin\2.x\Oracle.DataAccess.dll' targets a different processor than the application.
Actually I removed the old reference and added new 2.102.2.1 reference.
It will be helpful, please tell me the automatic code generation steps in VB Express Edition. No table adapter or dataset configuration wizards shows oracle data provider.
I don't Know where the concurrency violation raised in the below code.
ColdStorage30
Public Class FrmCustomers
Dim Cn As New Oracle.DataAccess.Client.OracleConnection
Dim daCustomers As New Oracle.DataAccess.Client.OracleDataAdapter
Dim cmbCustomers As New Oracle.DataAccess.Client.OracleCommandBuilder
Dim viewCustomers As New DataView
Dim cboview As New DataView
Dim ds As New DataSet
Private Sub FrmCustomers_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
' Dim daa As New Oracle.DataAccess.Client.OracleConnection
Cn.ConnectionString = My.Settings.DbCn.ToString
Cn.Open()
daCustomers = New Oracle.DataAccess.Client.OracleDataAdapter("Select * from Customers Order By Name", Cn)
daCustomers.TableMappings.Add("CUSTOMERS", "CUSTOMERS")
cmbCustomers = New Oracle.DataAccess.Client.OracleCommandBuilder(daCustomers)
daCustomers.InsertCommand = cmbCustomers.GetInsertCommand
daCustomers.UpdateCommand = cmbCustomers.GetUpdateCommand
daCustomers.DeleteCommand = cmbCustomers.GetDeleteCommand
daCustomers.Fill(ds, "CUSTOMERS")
'ds.Tables("CUSTOMERS").Columns("CUSTID").Unique = True
viewCustomers = New DataView(ds.Tables("CUSTOMERS"))
cboCustomers.DataSource = ds.Tables("CUSTOMERS")
cboCustomers.DisplayMember = ds.Tables("CUSTOMERS").Columns("Name").ToString
cboCustomers.ValueMember = ds.Tables("CUSTOMERS").Columns("CUSTID").ToString
cboCustomers.Refresh()
Catch ex As Exception
MsgBox(ex.Message)
Exit Sub
End Try
grdCustomers.DataSource = viewCustomers
grdCustomers.Columns("Name").Width = 120
grdCustomers.Columns("address").Width = 120
grdCustomers.Columns("City").Width = 100
grdCustomers.Columns("Phone1").Width = 80
grdCustomers.Columns("Phone2").Width = 80
grdCustomers.Columns("phone3").Width = 80
grdCustomers.Columns("Phone4").Width = 80
grdCustomers.Columns("Fax").Width = 80
grdCustomers.Columns("email").Width = 120
grdCustomers.Columns("TNGST").Width = 80
grdCustomers.Columns("Second_Lang_Name").Visible = False
grdCustomers.Columns("second_Lang_address").Visible = False
grdCustomers.Columns("second_Lang_City").Visible = False
grdCustomers.Columns("CustID").Visible = False
End Sub
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
'-- Verify the Values
If txtName.Text = "" Then
MsgBox("Enter the Customer Name Properly !", MsgBoxStyle.Critical)
Exit Sub
End If
If txtAddress.Text = "" Then
MsgBox("Enter the Address Properly !", MsgBoxStyle.Critical)
Exit Sub
End If
If txtCity.Text = "" Then
MsgBox("Enter the City Properly !", MsgBoxStyle.Critical)
Exit Sub
End If
Dim dr() As DataRow
If btnSave.Text = "&Update" Then
If cboCustomers.SelectedIndex = -1 Then
MsgBox("Select a Customer First Properly !", MsgBoxStyle.Critical)
Exit Sub
End If
dr = ds.Tables("Customers").Select("CustID = " & CLng(cboCustomers.SelectedValue))
'Dim dv As New DataView(ds.Tables("Customers"))
'dv.RowFilter = "CustID=" & CLng(cboCustomers.SelectedValue)
'If dv.Count > 0 Then
dr(0)("CustId") = CLng(cboCustomers.SelectedValue)
dr(0)("Name") = txtName.Text
dr(0)("Address") = txtAddress.Text
dr(0)("City") = txtCity.Text
dr(0)("PIN") = txtPIN.Text
dr(0)("Phone1") = txtPhone1.Text
dr(0)("Phone2") = txtPhone2.Text
dr(0)("Phone3") = txtPhone3.Text
dr(0)("Phone4") = txtPhone4.Text
dr(0)("Fax") = txtFax.Text
dr(0)("Email") = txtEmail.Text
dr(0)("TNGST") = txtTNGST.Text
dr(0)("Second_Lang_Name") = txtSecond_Lang_Name.Text
dr(0)("Second_Lang_Address") = txtSecond_Lang_Address.Text
dr(0)("Second_Lang_City") = txtSecond_Lang_City.Text
Try
MsgBox(daCustomers.UpdateCommand.CommandText.ToString)
daCustomers.Update(ds, "CUSTOMERS")
MsgBox("Customer Information Modified Successfully !", MsgBoxStyle.Information)
clear_fields()
btnSave.Text = "&Save"
txtName.Focus()
Exit Sub
Catch ex As Exception
MsgBox(ex.Message)
Exit Sub
End Try
Else
MsgBox("No Data Found . Unable to Update !")
End If
Dim cmd As New Oracle.DataAccess.Client.OracleCommand("Select Max(CustID) From Customers", Cn)
Dim CustID As Oracle.DataAccess.Types.OracleDecimal
CustID = CInt(cmd.ExecuteScalar()) '-- extra added for type conversion
Dim InsRow As DataRow
InsRow = ds.Tables("Customers").NewRow
If CustID.IsNull = True Then
InsRow.Item("CustID") = 1
Else
InsRow.Item("CustID") = CustID.Value + 1
End If
InsRow.Item("Name") = txtName.Text
InsRow.Item("Address") = txtAddress.Text
InsRow.Item("City") = txtCity.Text
InsRow.Item("Pin") = txtPIN.Text
InsRow.Item("Phone1") = txtPhone1.Text
InsRow.Item("Phone2") = txtPhone2.Text
InsRow.Item("Phone3") = txtPhone3.Text
InsRow.Item("Phone4") = txtPhone4.Text
InsRow.Item("Fax") = txtFax.Text
InsRow.Item("Email") = txtEmail.Text
InsRow.Item("tngst") = txtTNGST.Text
InsRow.Item("Second_Lang_Name") = txtSecond_Lang_Name.Text
InsRow.Item("Second_Lang_Address") = txtSecond_Lang_Address.Text
InsRow.Item("Second_Lang_City") = txtSecond_Lang_City.Text
ds.Tables("CUSTOMERS").Rows.Add(InsRow)
Try
MsgBox(daCustomers.InsertCommand.CommandText.ToString)
daCustomers.Update(ds.Tables("CUSTOMERS"))
ds.AcceptChanges()
clear_fields()
btnSave.Text = "&Save"
MsgBox("Entries Filed Successfully !", MsgBoxStyle.Information)
txtName.Focus()
Catch ex As Exception
MsgBox(ex.Message)
Exit Sub
End Try
End Sub
Thank you.

Similar Messages

  • Can a dataset be updated with DataAdapter.Update(dataSet)

    In Oracle is it possible to use the dataAdapter Update command to insert / update multiple rows of a dataset. I have an Oracle dataAdapter with stored procedures assigned to it for the select, insert, delete, and update. But I am unable to update through the Update() command. Are there examples of how to do this? If it cannot be done what is the preferred solution when dealing with multiple changes?

    Hi Dan,
    It should work.
    Can you show me your code that uses oracledataadapter and the code from one of your store procedures and tell me what error you get?
    Christian Shay
    Oracle

  • Multiple updates on dataset  = concurrecny exception

    I am getting concurrency exceptions whenever I try to update a dataset more than once. For example, if I fill a dataset, modify data, and then call the data.update method, it works fine. However, if I fill a dataset, modify data, call data.update, modify more data, and then call dataset.update again, I get a concurrency excetpion. I know that the table can be updated with no problem, and I do not get this problem on other data providers. It seems that ODP requires you to requery your dataset after each update, which doesn't seem correct to me. I tried requerying a dataset after each update and that does indeed work, but it seems unnecessary. A sample code snippet is below. Can someone let me know what I am missing.
    In the snippet below, the "dataSet" variable is a dataset which has already been filled and one records has already been modified.
    Dim command As New OracleCommand
    command.Connection = connection
    command.CommandText = sqlhelper.getStatement("evaluation", "update")
    'first insert
    adapter.TableMappings.Clear()
    adapter.TableMappings.AddRange(sqlhelper.evaluation_table_mapping)
    Dim cb As New OracleCommandBuilder(adapter)
    adapter.SelectCommand = command
    adapter.Update(dataSet, "egov_evaluation")
    '2nd insert
    'change some data
    CType(dataSet.Tables(0).Rows(0), EvaluationDataSet.egov_evaluationRow).gov_agencies_attendees = "new test update"
    adapter.TableMappings.Clear()
    adapter.TableMappings.AddRange(sqlhelper.evaluation_table_mapping)
    Dim newcb As New OracleCommandBuilder(adapter)
    adapter.SelectCommand = command
    adapter.Update(dataSet, "egov_evaluation")

    Followup:
    This issue was caused by the SQL statement generated by the command builder. For those who haven't seen it yet, the command builder will generate a sql statement like "UPDATE <table> set <column1> = <value1>, <column2> = <value2> where <column1> = <orig column1 value> and <column2> = <orig column2 value>"
    So if any of the fields don't match up in the where clause, you get the concurrency exception. We were getting stale data, and another issue caused by a bad query generated from the command builder, but this is worked around by writing our own update statements.
    The only annoying thing is that our app doesn't care about concurrency, so we actually wanted to turn off the concurrency checking in the where clause, but, such is life.

  • How to update the Dataset of a report running with universe?

    I am facing some issue in cross-tab.
    My requirement is , on click of any cell in cross-tab i want to convert  it into editable cell.
    Converting into editable cell is something which I achieved using below code:
    function onCellClick(e) {
      var text=this.innerHTML;
      var text = $.trim(this.innerHTML);
             $('<input />').attr({ type: 'text', name: 'text' }).appendTo($(this)).val(text).select().blur(
            function () {
                var newText = $(this).val();
                $(this).parent().text(newText).find('input').remove();
                var rIndex=$(this).closest('tr').index();
                data.data[rIndex]=newText;
                that.firePropertiesChanged(["data"]);
                //that.firePropertiesChanged(["visSelection"]);
        that.fireEvent("onSelect");
    I just modified the sample code.
    My report is  running with universe.
    Now I want to update the Dataset with this updated value.
    Can anyone provide any help on the same?
    Thanks

    Hi Michael,
    You got it right.
    Let me tell you the whole story:
    I have a weird requirement of creating editable grid. And the values which I edit into grid get saved into database.
    By using javascript I am able to edit grid cell item into HTML.
    Now after this I have two hitches:
    1. I am not able to get the updated cell values in Design Studio. I think this issues goes to SDK side. I try to create a external script variable and use this into Design Studio.But somehow it always throw blank.
    2.  I am not able to update dataset. I know updating the dataset permanently is not possible as its getting created from universe. But I just want to update the dataset so that any change in measure values also update total of that column.
    I start this thing this week only. So might be I am asking few stupid question. Please bear with me.
    Thanks
    Amit

  • Update query (or other method) to a typed dataset

    Hi
    i have created a typed DataSet in code that is created at runtime. It gets populated then it needs to be updated based on 2 paramaters
    EmployeeID & AssignmentID
    How can i run an update query on the runtime created Dataset? Hee is how i create my Dataset-
    Private sGridDataSet As New DataSet("GridDataset")
    Private tblGridTable As DataTable
    sGridDataSet.CaseSensitive = False
    tblGridTable = sGridDataSet.Tables.Add("tblGrid")
    With tblGridTable
    .Columns.Add("AssignmentID", GetType(System.String))
    .Columns.Add("ProjectName", GetType(System.String))
    .Columns.Add("Day1", GetType(System.String))
    .Columns.Add("Day2", GetType(System.String))
    .Columns.Add("Day3", GetType(System.String))
    .Columns.Add("Day4", GetType(System.String))
    .Columns.Add("Day5", GetType(System.String))
    .Columns.Add("Day6", GetType(System.String))
    .Columns.Add("Day7", GetType(System.String))
    End With
    'get data from qryAssignments
    sAssignID = Me.AssignmentData.qryAssignments.Rows(j)(1)
    sProjName = Me.AssignmentData.qryAssignments.Rows(j)(0)
    newValues = {sAssignID, sProjName, Day1, Day2, Day3, Day4, Day5, Day6, Day7}
    tblGridTable.Rows.Add(newValues)
    Me.QryAssignmentsTableAdapter.ClearBeforeFill = True
    Dim sDate As Date = Me.txtDate.Text
    Dim EndDate As Date = sDate.AddDays(6)
    Me.QryAssignmentTimesTableAdapter.Fill(Me.AssignmentData.qryAssignmentTimes, Me.txtEmployeeID.Text, Me.txtDate.Text, CStr(CType(CStr(EndDate), DateTime)))
    Dim p As Integer = 0
    For p = 0 To Me.AssignmentData.qryAssignmentTimes.Rows.Count - 1
    vDayNo = Weekday(Me.AssignmentData.qryAssignmentTimes.Rows(p)(0), FirstDayOfWeek.Monday)
    Dim m As String = Me.AssignmentData.qryAssignmentTimes.Rows(p)(0)
    'NEED TO UPDATE DATASET TABLE HERE BASED ON EMPLOYEEID AND ASSIGNMENTID
    Next
    Me.GridControl1.DataSource = tblGridTable
    Hopefully, someone can give me a few pointers :)
    Thanks
    Nigel
    Nacho is the derivative of Nigel &amp;quot;True fact!&amp;quot;

    Hello,
    If I have more than one table to work with, a DataSet would be the container while if one table then no DataSet, just a DataTable. I would use code similar to the following which is for MS-Access yet by changing to SqlClient data provider instead of OelDb
    data provider the same methods work.
    Taken from
    this project.
    Module DatabaseOperations
    Private Builder As New OleDb.OleDbConnectionStringBuilder With
    .Provider = "Microsoft.ACE.OLEDB.12.0",
    .DataSource = IO.Path.Combine(Application.StartupPath, "Database1.accdb")
    ''' <summary>
    ''' Read USA customers from database into a DataTable
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks>
    ''' Database is assumed to be in the Bin\Debug folder.
    ''' </remarks>
    Public Function LoadCustomers() As DataTable
    Using cn As New OleDb.OleDbConnection With {.ConnectionString = Builder.ConnectionString}
    Using cmd As New OleDb.OleDbCommand With {.Connection = cn}
    cmd.CommandText =
    <SQL>
    SELECT
    Identifier,
    CompanyName,
    ContactName,
    ContactTitle,
    Address,
    City,
    PostalCode,
    Country
    FROM Customer;
    </SQL>.Value
    Dim dt As New DataTable With {.TableName = "Customer"}
    Try
    cn.Open()
    dt.Load(cmd.ExecuteReader)
    dt.Columns("Identifier").ColumnMapping = MappingType.Hidden
    dt.Columns("Country").ColumnMapping = MappingType.Hidden
    Catch ex As Exception
    MessageBox.Show("Failed to load customer data. See error message below" & Environment.NewLine & ex.Message)
    End Try
    dt.AcceptChanges()
    Return dt
    End Using
    End Using
    End Function
    Public Function RemoveCurrentCustomer(ByVal Identfier As Integer) As Boolean
    Try
    Using cn As New OleDb.OleDbConnection With {.ConnectionString = Builder.ConnectionString}
    Using cmd As New OleDb.OleDbCommand With {.Connection = cn}
    cmd.CommandText = "DELETE FROM Customer WHERE Identifier = ?"
    Dim IdentifierParameter As New OleDb.OleDbParameter With
    .DbType = DbType.Int32,
    .ParameterName = "P1",
    .Value = Identfier
    cmd.Parameters.Add(IdentifierParameter)
    Try
    cn.Open()
    Dim Affected = cmd.ExecuteNonQuery
    Return Affected = 1
    Catch ex As Exception
    Return False
    End Try
    End Using
    End Using
    Catch ex As Exception
    ' Handle or not handle exceptions for failed save operation
    Return False
    End Try
    End Function
    Public Function AddNewRow(ByVal Name As String, ByVal Contact As String, ByRef Identfier As Integer) As Boolean
    Dim Success As Boolean = True
    Try
    Using cn As New OleDb.OleDbConnection With {.ConnectionString = Builder.ConnectionString}
    Using cmd As New OleDb.OleDbCommand With {.Connection = cn}
    cmd.CommandText =
    <SQL>
    INSERT INTO Customer
    CompanyName,
    ContactName
    Values
    @CompanyName,
    @ContactName
    </SQL>.Value
    cmd.Parameters.AddWithValue("@CompanyName", Name)
    cmd.Parameters.AddWithValue("@ContactName", Contact)
    cn.Open()
    cmd.ExecuteNonQuery()
    cmd.CommandText = "Select @@Identity"
    Identfier = CInt(cmd.ExecuteScalar)
    End Using
    End Using
    Catch ex As Exception
    Success = False
    End Try
    Return Success
    End Function
    Public Function SaveChanges(ByVal sender As DataRow) As Boolean
    Try
    Using cn As New OleDb.OleDbConnection With {.ConnectionString = Builder.ConnectionString}
    Using cmd As New OleDb.OleDbCommand With {.Connection = cn}
    cmd.CommandText =
    <SQL>
    UPDATE
    Customer
    SET
    CompanyName=?,
    ContactName=?
    WHERE Identifier = ?
    </SQL>.Value
    Dim CompanyNameParameter As New OleDb.OleDbParameter With
    .DbType = DbType.String,
    .ParameterName = "P1",
    .Value = sender.Field(Of String)("CompanyName")
    cmd.Parameters.Add(CompanyNameParameter)
    Dim ContactNameParameter As New OleDb.OleDbParameter With
    .DbType = DbType.String,
    .ParameterName = "P2",
    .Value = sender.Field(Of String)("ContactName")
    cmd.Parameters.Add(ContactNameParameter)
    Dim IdentifierParameter As New OleDb.OleDbParameter With
    .DbType = DbType.Int32,
    .ParameterName = "P3",
    .Value = sender.Field(Of Int32)("Identifier")
    cmd.Parameters.Add(IdentifierParameter)
    Try
    cn.Open()
    Dim Affected = cmd.ExecuteNonQuery
    Return Affected = 1
    Catch ex As Exception
    Return False
    End Try
    End Using
    End Using
    Catch ex As Exception
    ' Handle or not handle exceptions for failed save operation
    Return False
    End Try
    End Function
    End Module
    Here is an example of retrieving a row of data via a where condition
    Public Sub LoadSingle(ByVal Identifier As Integer)
    Using cn As New OleDb.OleDbConnection With
    .ConnectionString = Builder.ConnectionString
    Using cmd As New OleDb.OleDbCommand With {.Connection = cn}
    cmd.CommandText =
    <SQL>
    SELECT
    Identifier,
    CompanyName,
    ContactName
    FROM
    Customers
    WHERE Identifier=@Identifier
    </SQL>.Value
    cmd.Parameters.Add(New OleDb.OleDbParameter With
    .DbType = DbType.Int32,
    .ParameterName = "@Identifier",
    .Value = Identifier
    cn.Open()
    Dim Reader As OleDb.OleDbDataReader = cmd.ExecuteReader
    If Reader.HasRows Then
    Reader.Read()
    Console.WriteLine("Name: {0} Contact name: {1}",
    Reader.GetString(1), Reader.GetString(2))
    End If
    End Using
    End Using
    End Sub
    Here you can see (using a random example) that SQL-Server code uses the same logic and methods
    Using cn As New SqlConnection With {.ConnectionString = MyConnectionString}
    Dim CompanySearch As String = "An"
    Using cmd As New SqlCommand With {.Connection = cn}
    cmd.CommandText =
    <SQL>
    SELECT CompanyName
    FROM
    Customers
    WHERE
    CompanyName LIKE @CompanyName
    </SQL>.Value
    cmd.Parameters.Add(
    New SqlParameter With
    .DbType = DbType.String,
    .Value = CompanySearch & "%",
    .ParameterName = "@CompanyName"
    cn.Open()
    Dim Reader = cmd.ExecuteReader
    If Reader.HasRows Then
    While Reader.Read
    Console.WriteLine(Reader.GetString(0))
    End While
    Else
    Console.WriteLine("No matches")
    End If
    End Using
    End Using
    So all the above is "hand coding" and there is still the option to use Adapters but for simple stuff they are over kill. The only benefit for them with simple stuff is if you are a visual person, thats it.
    See also:
    This article on creating SQL statement as per how I did it in the examples above. In the next release of Visual Studio this method will be easier similar to C#
    Currently in C# we can do this
    string selectStatement = @"
    SELECT CompanyName
    FROM
    Customers
    WHERE
    CompanyName LIKE @CompanyName";
    On creating a DataTable, check out this simple utility
    https://code.msdn.microsoft.com/DataTable-creator-95b655b3
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • How to get an UPDATABLE REF CURSOR from the STORED PROCEDURE

    using C# with
    ORACLE OLE DB version: 9.0.0.1
    ADO version: 2.7
    I returns a REF CURSOR from a stored procedure seems like:
    type TCursor is ref cursor;
    procedure test_out_cursor(p_Dummy in varchar, p_Cur out TCursor) is
    begin
         open p_Cur for select * from DUAL;
    end;
    I create an ADO Command object and set
    cmd.Properties["IRowsetChange"].Value = true;
    cmd.Properties["Updatability"].Value = 7;
    cmd.Properties["PLSQLRSet"].Value = 1;
    cmd.CommandText = "{CALL OXSYS.TEST.TEST_OUT_CURSOR(?)}";
    and I use a Recordset object to open it:
    rs.Open(cmd, Missing.Value,
    ADODB.CursorTypeEnum.adOpenStatic,
    ADODB.LockTypeEnum.adLockBatchOptimistic,
    (int) ADODB.CommandTypeEnum.adCmdText +
    (int) ADODB.ExecuteOptionEnum.adOptionUnspecified);
    The rs can be opened but can NOT be updated!
    I saved the recordset into a XML file and there's no
    rs:baseschema/rs:basetable/rs:basecolumn
    attributes for "s:AttributeType" element.
    Any one have idea about this?
    thanks very much

    It is not possible through ADO/OLEDB.
    Try ODP.NET currently in Beta, it is possible to update DataSet created with refcursors. You need to specify your custom SQL or SP to send update/insert/delete.
    As I remember there is a sample with ODP.NET Beta 1 just doing this.

  • Problem regarding Update-Statement on se11 table

    Hello I tried to update a dataset in a se11 table using UPDATE Statement.
    It doesn't work and I get a sy-subrc = 4.
    That is my code:
    TABLES ZTDM_SAPOUTPUT.
    * Arbeitsbereich definieren
    DATA:
    wa_ZTDM_SAPOUTPUT LIKE ZTDM_SAPOUTPUT.
    wa_ZTDM_SAPOUTPUT-PK = '1'.
    wa_ZTDM_SAPOUTPUT-FNCODE = '3'.
    wa_ZTDM_SAPOUTPUT-MATNR = '3'.
    wa_ZTDM_SAPOUTPUT-MAKTX = '3'.
    wa_ZTDM_SAPOUTPUT-ZEINR = '3'.
    wa_ZTDM_SAPOUTPUT-MATKL = '3'.
    wa_ZTDM_SAPOUTPUT-STATE = '1'.
    UPDATE ZTDM_SAPOUTPUT FROM wa_ZTDM_SAPOUTPUT.
    Write: 'UPDATE returned' , sy-subrc.
    SKIP.
    The given Dataset having PK=1 doesn't get updated.
    Maybe my understanding is wrong:
    Is it correct that the updated dataset ist defined by the primary key in this workingarea?
    My Primary Key is PK.
    Can you see the error?

    UPDATE  dbtab      FROM wa. or
    UPDATE (dbtabname) FROM wa.
    Changes one single line in a database table, using a primary key to identify the line and taking the values to be changed from the specified work area, wa. The data is read out of wa from left to right, matching the line structure of the database table dbtab. The structure of wa remains unchanged. This means that wa must be at least as wide (see DATA) as the line structure of dbtab, and have the same alignment. Otherwise, a runtime error occurs.
    If either the database table, dbtab, or the work area, wa, contain Strings, wa must be compatible with the line structure of dbtab.
    Example
    Changing the telephone number of the customer with customer number '12400177' in the current client:
    DATA   wa TYPE scustom.
    SELECT SINGLE * FROM scustom INTO wa
      WHERE id = '12400177'.
    wa-telephone = '06201/44889'.
    UPDATE scustom FROM wa.
    When the command has been executed, the system field SY-DBCNT contains the number of updated lines (0 or 1).
    Examples
    Update discount for the customer with the customer number '00017777' to 3 percent (in the current client):
    DATA: wa TYPE scustom.
    SELECT SINGLE * FROM scustom INTO wa
      WHERE id = '00017777'.
    wa-discount = '003'.
    UPDATE scustom FROM wa.
    The Return Code is set as follows:
    SY-SUBRC = 0:
    The specified line has been updated.
    SY-SUBRC = 4:
    The system could not update any line in the table, since there is no line with the specified primary key.
    rwrd if helpful
    bhupal

  • Updating a UITVC

    From a UITVC that is displaying objects of an array as its lines, I touch the '+' UIBarButtonItem.
    This creates and pushes a nib-based UIVC which lets me create a new line for the array displayed in the previous UITVC.
    Obviously, if I just popViewControllerAnimated: I'll get the table I saw before in the UITVC. But I've now added another row to the array and want the new row to appear in the table.
    What's the best approach for this?
    I'm guessing my only choice is to make sure the UITVC is always reading the array fresh every time it gets loaded. Currently I'm just passing the array to it from its previous UITVC.
    Thanks.
    -Phil

    Not the result I expected.
    I'm surprised to see the numberOfRowsInSection log appearing before the viewWillAppear log.
    Of course the numberOfRows log will be null because the data is read and reloaded in viewWillAppear.
    I must be missing something key. What could it be?
    First make sure the array is correctly hooked up as the data source and not nil or empty when the table is reloading:
    Not sure how to verify the array is correctly hooked up as the data source. If there was a step I was supposed to take to hook that up, that's probably it cuz I'm not remembering doing that.
    But the good news is the C->B is now showing a correctly updated dataset. Hmmm.....
    -Phil
    A -->> B
    2009-10-06 23:33:30.964 CD[57692:20b] ** numberOfRowsInSection: lines= (null) count=0
    2009-10-06 23:33:30.966 CD[57692:20b] ** numberOfRowsInSection: lines= (null) count=0
    2009-10-06 23:33:30.967 CD[57692:20b] ** viewWillAppear: lines= (
    Catalog = 100uB;
    Quantity = 5;
    Reference = PCurry;
    Catalog = "ABC-123";
    Quantity = 2;
    Reference = JJohnson;
    Catalog = "ju-001";
    Quantity = 1;
    Reference = treehouse;
    2009-10-06 23:33:30.969 CD[57692:20b] ** cellForRowAtIndexPath: row=0
    C -->> B
    2009-10-06 23:34:05.755 CD[57692:20b] ** numberOfRowsInSection: lines= (
    Catalog = 100uB;
    Quantity = 5;
    Reference = PCurry;
    Catalog = "ABC-123";
    Quantity = 2;
    Reference = JJohnson;
    Catalog = "ju-001";
    Quantity = 1;
    Reference = treehouse;
    Catalog = "b-100";
    Quantity = 99;
    Reference = zz;
    ) count=4
    2009-10-06 23:34:05.756 CD[57692:20b] ** numberOfRowsInSection: lines= (
    Catalog = 100uB;
    Quantity = 5;
    Reference = PCurry;
    Catalog = "ABC-123";
    Quantity = 2;
    Reference = JJohnson;
    Catalog = "ju-001";
    Quantity = 1;
    Reference = treehouse;
    Catalog = "b-100";
    Quantity = 99;
    Reference = zz;
    ) count=4
    2009-10-06 23:34:05.757 CD[57692:20b] ** viewWillAppear: lines= (
    Catalog = 100uB;
    Quantity = 5;
    Reference = PCurry;
    Catalog = "ABC-123";
    Quantity = 2;
    Reference = JJohnson;
    Catalog = "ju-001";
    Quantity = 1;
    Reference = treehouse;
    Catalog = "b-100";
    Quantity = 99;
    Reference = zz;
    2009-10-06 23:34:05.760 CD[57692:20b] ** cellForRowAtIndexPath: row=0
    2009-10-06 23:34:05.762 CD[57692:20b] ** cellForRowAtIndexPath: row=0
    2009-10-06 23:34:05.764 CD[57692:20b] ** cellForRowAtIndexPath: row=1
    2009-10-06 23:34:05.765 CD[57692:20b] ** cellForRowAtIndexPath: row=2
    2009-10-06 23:34:05.766 CD[57692:20b] ** cellForRowAtIndexPath: row=3
    - (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    CDAppDelegate* cd = (CDAppDelegate*)[[UIApplication sharedApplication] delegate];
    orders = [[cd readOrders] retain]; // an array of dicts
    [self.tableView reloadData];
    currentOrder = [orders objectAtIndex:0];
    lines = [[currentOrder valueForKey:@"Lines"] retain];
    NSLog(@"** viewWillAppear: lines= %@", lines);
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    NSLog(@"** numberOfRowsInSection: lines= %@ count=%d", lines, [lines count]);
    if ( section == 0 ) return 1;
    else return [lines count];
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    int row = [indexPath row];
    NSLog(@"** cellForRowAtIndexPath: row=%d", row);
    static NSString *CellIdentifier = @"Cell";
    < snip >
    d = [[[lines objectAtIndex:indexPath.row] valueForKey:@"Quantity"] intValue];
    strValue = [NSString stringWithFormat:@"%d", d];
    tmpLabel.text = strValue;
    tmpLabel.text = [[lines objectAtIndex:indexPath.row] valueForKey:@"Catalog"];
    tmpLabel.text = [[lines objectAtIndex:indexPath.row] valueForKey:@"Reference"];
    < snip >
    return cell;

  • OracleDataAdapter changes table row state after first Update call

    I have a single dataset containining multiple tables, connected by relation with cascade constraints.
    When I try to do something like:
    OracleDataAdapter da1 = new OracleDataAdapter();
    da1.InsertCommand = previouslyInitializedCommand;
    OracleDataAdapter da2 = new OracleDataAdapter();
    da2.InsertCommand = anotherCommand()
    using (TransactionScope ts = new TransactionScope())
    using (OracleConnecction conn = new OracleConnection(connString))
    conn.Open();
    da1.InsertCommand.Connection = conn;
    da2.InsertCommand.Connection = conn;
    da1.Update(dataset.Table1);
    da2.Update(dataset.Table2);
    ts.Complete();
    The second Update never happens because the first Update call changes Table2 row status to "Unmodified" so no INSERT command is issued.
    Anyone knows how this behaviour can be avoided?

    Hi,
    Maybe take a look here: [http://msdn.microsoft.com/en-US/library/33y2221y%28v=vs.80%29.aspx]
    I would focus on this part:
    Ordering of Inserts, Updates, and Deletes
    In many circumstances, the order in which changes made through the DataSet are sent to the data source is important. For example, if a primary key value for an existing row is updated and a new row has been added with the new primary key value as a foreign key, it is important to process the update before the insert.
    You can use the Select method of the DataTable to return a DataRow array that only references rows with a particular RowState. You can then pass the returned DataRow array to the Update method of the DataAdapter to process the modified rows. By specifying a subset of rows to be updated, you can control the order in which inserts, updates, and deletes are processed.
    DataTable table = dataSet.Tables["Customers"];
    // First process deletes.
    adapter.Update(table.Select(null, null, DataViewRowState.Deleted));
    // Next process updates.
    adapter.Update(table.Select(null, null,
      DataViewRowState.ModifiedCurrent));
    // Finally, process inserts.
    adapter.Update(table.Select(null, null, DataViewRowState.Added));r,
    dennis

  • Concurrency violation with an update of a VARCHAR2(4000)

    I receive this error when I try to update a record with a field in VARCHAR2(4000).
    System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
    at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
    at Oracle.DataAccess.Client.OracleDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
    at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable)
    I used the OracleCommandBuilder in transactional mode to update the db.
    I have no error if there are few characters in the field, but the error occurs if the field is practically filled. Im sure there is nobody else updating this table.
    I have the same error with the beta2 and the released version.

    This is in the odp.net readme file:
    Size of the data inserted in a Varchar2 column using OracleDbType.Varchar2 parameter type is limited to 2000 characters.
    [bug #1868843, bug #2420617]
    The concurrency error is because 0 records updated.. but the reason why 0 records were updated is probably because of the above.
    Hope that helps..
    -Andrew Douglas

  • SCCM 2012 Compliance 7 Customize for Total Updates Needed

    I can't find single report in SCCM 2012 that lists the total count of updates needed for each computer. This really irks me and many others as this and similar info was readily available with the old WSUS console. It also takes a lot more
    clicks to get the same info in SCCM (if SCCM even has it) as it did in WSUS. Anyway, I've decided to try to customize an existing report. I made a copy of "Compliance 7 - Computers in a specific compliance state for an update group (secondary)".
    Try as I might, I can't get the query to work right to create a field for number of updates required for each computer. I'd really like columns for Failed/Needed/Applied but I'll start with just Needed. Why they got rid of this in SCCM reporting baffles me.
    I have several SQL queries that pull this info for needed patches when run in Management Studio but I can't get them to work in a SCCM Report. Does anyone know how to do this?
    Ben JohnsonWY

    I'm looking at Compliance 1, 5, and 7. The closest to what I want is Compliance 7 but with a new column for "Required Updates". I have that column made but it's not populated. I have a "Required Updates" Dataset now inside this custom
    report. BUT the row of info in the table (computer name, last logon, etc) only lets you select fields from Dataset0. Where I'm stuck is how get to the "Required_Updates" field from the "Required Updates" dataset to appear in Dataset0.
    I've spent a big chunk of time trying to get the code from the two queries merged but I can't get it to work. The other option is to somehow get the field to appear in the row's field selection list (ie, read field from both datasets).
    Oh, and when I followed your steps above, I got the report created but it throws and "error during processing" error when I run it.
    Ben JohnsonWY

  • Local MS Access file and SET COUNT

    I have a small app that relies on a local MS Access database file for retrieving and storing information.
    I've used the "Add new data source" wizard in Visual Studio and then I've bound a couple of richtextboxes to the one (1) table in the database file.
    I use this code to let the user save updated text to the file, however it sometimes keeps throwing an error. The code is:
    MyDataBindingSource.EndEdit()
    CustomersTableAdapter.Update(CustomerdatabaseDataSet)
    The error thrown, seemingly at random, but probably occuring when the users edit multiple values, is this: "An unhandled exception of type 'System.Data.DBConcurrencyException' occurred in System.Data.dll". According to http://support2.microsoft.com/kb/310375/en-us
    I should set "NOCOUNT" to OFF instead of ON, but no amount of googling is able to tell me how to do that. I've been all over my code and the queries/code generated by the VS wizard, but I cant find any NOCOUNT setting anywhere.
    Help, please?

    Hello again
    Does this output help? I've also pasted the code I'm using below. Many thanks, really out in the deep end here
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll', Skipped loading symbols. Module is optimized
    and the debugger option 'Just My Code' is enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code'
    is enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll', Skipped loading symbols. Module is
    optimized and the debugger option 'Just My Code' is enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll', Skipped loading symbols. Module is optimized and the debugger
    option 'Just My Code' is enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\rbl\Documents\Visual Studio 2012\Projects\RuBe Ktj\RuBe Ktj\bin\Debug\RuBe Ktj.vshost.exe', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Deployment\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is
    enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll', Skipped loading symbols. Module is optimized and the debugger option
    'Just My Code' is enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualBasic\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My
    Code' is enabled.
    The thread 'vshost.NotifyLoad' (0x1674) has exited with code 0 (0x0).
    The thread 'vshost.LoadReference' (0x1e80) has exited with code 0 (0x0).
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\rbl\Documents\Visual Studio 2012\Projects\RuBe Ktj\RuBe Ktj\bin\Debug\RuBe Ktj.exe', Symbols loaded.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Remoting\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll'
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms.resources\v4.0_4.0.0.0_sv_b77a5c561934e089\System.Windows.Forms.resources.dll'
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_sv_b77a5c561934e089\mscorlib.resources.dll'
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibility.dll'
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is
    enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just
    My Code' is enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.Wrapper.dll', Skipped loading symbols. Module is optimized and the debugger option
    'Just My Code' is enabled.
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code'
    is enabled.
    StackTrace: '   vid System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       vid System.Environment.get_StackTrace()
       vid RuBe_Ktj.Form1.Form1_Load(Object sender, EventArgs e) i C:\Users\rbl\Documents\Visual Studio 2012\Projects\RuBe Ktj\RuBe Ktj\Form1.vb:rad 20
       vid System.EventHandler.Invoke(Object sender, EventArgs e)
       vid System.Windows.Forms.Form.OnLoad(EventArgs e)
       vid System.Windows.Forms.Form.OnCreateControl()
       vid System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       vid System.Windows.Forms.Control.CreateControl()
       vid System.Windows.Forms.Control.WmShowWindow(Message& m)
       vid System.Windows.Forms.Control.WndProc(Message& m)
       vid System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       vid System.Windows.Forms.ContainerControl.WndProc(Message& m)
       vid System.Windows.Forms.Form.WmShowWindow(Message& m)
       vid System.Windows.Forms.Form.WndProc(Message& m)
       vid System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       vid System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       vid System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       vid System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
       vid System.Windows.Forms.Control.SetVisibleCore(Boolean value)
       vid System.Windows.Forms.Form.SetVisibleCore(Boolean value)
       vid System.Windows.Forms.Control.set_Visible(Boolean value)
       vid System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       vid System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       vid System.Windows.Forms.Application.Run(ApplicationContext context)
       vid Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       vid Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       vid Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       vid RuBe_Ktj.My.MyApplication.Main(String[] Args) i 17d14f5c-a337-4978-8281-53493378c1071.vb:rad 81
       vid System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       vid System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       vid Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       vid System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       vid System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       vid System.Threading.ThreadHelper.ThreadStart()'
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualBasic.resources\v4.0_10.0.0.0_sv_b03f5f7f11d50a3a\Microsoft.VisualBasic.resources.dll'
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.resources\v4.0_4.0.0.0_sv_b77a5c561934e089\System.Data.resources.dll'
    A first chance exception of type 'System.Data.DBConcurrencyException' occurred in System.Data.dll
    'RuBe Ktj.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Transactions.resources\v4.0_4.0.0.0_sv_b77a5c561934e089\System.Transactions.resources.dll'
    System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Ohanterat
    undantag</Description><AppDomain>RuBe Ktj.vshost.exe</AppDomain><Exception><ExceptionType>System.Data.DBConcurrencyException, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Simultankörningsfel:
    UpdateCommand inverkade på 0 i stället för 1 poster.</Message><StackTrace>   vid System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
       vid System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
       vid System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
       vid System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping)
       vid System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable)
       vid RuBe_Ktj.KunddatabasDataSetTableAdapters.KunderTableAdapter.Update(KunddatabasDataSet dataSet) i C:\Users\rbl\Documents\Visual Studio 2012\Projects\RuBe Ktj\RuBe Ktj\KunddatabasDataSet.Designer.vb:rad 1409
       vid RuBe_Ktj.Form1.Button6_Click(Object sender, EventArgs e) i C:\Users\rbl\Documents\Visual Studio 2012\Projects\RuBe Ktj\RuBe Ktj\Form1.vb:rad 152
       vid System.Windows.Forms.Control.OnClick(EventArgs e)
       vid System.Windows.Forms.Button.OnClick(EventArgs e)
       vid System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       vid System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks)
       vid System.Windows.Forms.Control.WndProc(Message&amp;amp; m)
       vid System.Windows.Forms.ButtonBase.WndProc(Message&amp;amp; m)
       vid System.Windows.Forms.Button.WndProc(Message&amp;amp; m)
       vid System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m)
       vid System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)
       vid System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       vid System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp;amp; msg)
       vid System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       vid System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       vid System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       vid System.Windows.Forms.Application.Run(ApplicationContext context)
       vid Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       vid Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       vid Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       vid RuBe_Ktj.My.MyApplication.Main(String[] Args) i 17d14f5c-a337-4978-8281-53493378c1071.vb:rad 81
       vid System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       vid System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       vid Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       vid System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       vid System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       vid System.Threading.ThreadHelper.ThreadStart()</StackTrace><ExceptionString>System.Data.DBConcurrencyException: Simultankörningsfel: UpdateCommand inverkade på 0 i stället för 1 poster.
       vid System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
       vid System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
       vid System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
       vid System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping)
       vid System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable)
       vid RuBe_Ktj.KunddatabasDataSetTableAdapters.KunderTableAdapter.Update(KunddatabasDataSet dataSet) i C:\Users\rbl\Documents\Visual Studio 2012\Projects\RuBe Ktj\RuBe Ktj\KunddatabasDataSet.Designer.vb:rad 1409
       vid RuBe_Ktj.Form1.Button6_Click(Object sender, EventArgs e) i C:\Users\rbl\Documents\Visual Studio 2012\Projects\RuBe Ktj\RuBe Ktj\Form1.vb:rad 152
       vid System.Windows.Forms.Control.OnClick(EventArgs e)
       vid System.Windows.Forms.Button.OnClick(EventArgs e)
       vid System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       vid System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks)
       vid System.Windows.Forms.Control.WndProc(Message&amp;amp; m)
       vid System.Windows.Forms.ButtonBase.WndProc(Message&amp;amp; m)
       vid System.Windows.Forms.Button.WndProc(Message&amp;amp; m)
       vid System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m)
       vid System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)
       vid System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       vid System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp;amp; msg)
       vid System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       vid System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       vid System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       vid System.Windows.Forms.Application.Run(ApplicationContext context)
       vid Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       vid Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       vid Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       vid RuBe_Ktj.My.MyApplication.Main(String[] Args) i 17d14f5c-a337-4978-8281-53493378c1071.vb:rad 81
       vid System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       vid System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       vid Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       vid System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       vid System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       vid System.Threading.ThreadHelper.ThreadStart()</ExceptionString></Exception></TraceRecord>
    An unhandled exception of type 'System.Data.DBConcurrencyException' occurred in System.Data.dll
    Additional information: Simultankörningsfel: UpdateCommand inverkade på 0 i stället för 1 poster.
    The program '[7824] RuBe Ktj.vshost.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).
    Adding a new row:
    Private Sub Button6_Click_1(sender As Object, e As EventArgs) Handles SkapanyrutinBtn.Click
    Dim newrow As DataRow = KunddatabasDataSet.Tables("Kunder").NewRow()
            Dim newrowname As Object = InputBox("Skriv in (kund)namn på den nya rutinen")
            newrow("Kundnamn") = newrowname
            If newrowname = "" Then
                Exit Sub
            End If
            KunddatabasDataSet.Tables("Kunder").Rows.Add(newrow)
    KunderBindingSource.EndEdit()
            KunderTableAdapter.Update(KunddatabasDataSet)
    End Sub
    Attempting to save:
    Private Sub Button6_Click(sender As Object, e As EventArgs) Handles SavechangedBtn.Click
    KunderBindingSource.EndEdit()
            KunderTableAdapter.Update(KunddatabasDataSet) ' <--- This is where the error is thrown!
    End Sub

  • SCOM and SharePoint 2010 Add-In for Dashboards (Issue)

    I have an environment with SCOM 2007 R2, all working fine. I have installed ans new test server to integrate SCOM and SahrePoint 2010. On this server I have installed Visio 2010 (Yes, I know, never install Visio in a server, but this ins juts for test).
    I have installed Visio Add-In and SharePoint 2010 Add-In.
    All my dashboards created in Visio to reflect health state are working fine on Visio, in fullscreen. But, When I import this Visio file, (in . VWD), to SharePoint, I can see normally the Visio in my Webpart, all showing fine (I have used the step by step
    to configure SCOM and SharePoint integration). But, after my first Refresh for the diagram all Health State Icons becomes a FAIL Icon (like image below). This sounds like some permission problem, because on Visio all Health State Icons works fine.
    Someone can help me?

    I have used this step by step before, but I think the problem is a parte, because I dont understand better, the part is:
    To configure Visio Services for Read-Only Operator permissions on the RMS
    In order for Visio Services to refresh the diagrams that are published and connected to Operations Manager data, the Visio Services service application must be configured with credentials that have access to the RMS. This is because
    the Visio Services service application is executing the data provider which is responsible for returning the updated dataset from the RMS.
    The easiest way to configure this is to make the account that Visio Services is running as a Read-Only Operator on the RMS.
    To do this…
    Create domain account
    Run the Operations Manager console.
    From the Administration tab click on User Roles.
    In the User Roles list double-click on the Read-Only Operators role.
    Add the account that is configured for Service Application Pool.
    Can anyone help me about where configure this account on SharePoint??

  • Tom tom for e71

    Hi, first post, so please help. I have an e71 which I love. I had an e63 which I also loved. It came with a tom tom card and gps receiver. My question is this. How do I get this up and running on the e71. I have the memory sd card for the tom tom but obviously the e71 has a micro sd. Can anybody help and talk me through it. Thanks.

    TomTom has pretty much ceased development of their S60 product line. It had a good run, but the dataset is now outdated and you can't use it with the E71's internal GPS receiver. My suggestion is to use Ovi Maps 3 as suggested as it is much a quicker application with updated dataset. It also supports satellite and is free to install. It operates on a shareware-like model - meaning some of the functionality like voice navigation and traffic updates can only be used when subscribed.
    The biggest issue with Ovi Maps in comparison to TomTom is that the UI isn't as optimised for in-car use where large icons and fonts work better.
    In any case, TomTom works fine with the E71 though you will need to get a Bluetooth GPS receiver (which I notice you already have). The E63 has a microSD card slot, so I assume the TomTom card that came with it is also a microSD card. If that is the case, you will just need to insert the card onto your E71. If all the required files are present, the installer should automatically run. Follow the promts and you should get it installed. Beware that you will have to activate the copy of TomTom in order to run it.
    http://www.ttcode.com/
    E55-1 RM-482

  • ZES Policy Reporting

    We have a single server ZES install with a 2005 SQL server DB backend. Version shows 3.5.0.82 on the ESM Console.
    Have a policy in place with USB controls, Integrity rules, Encryption... Working great.
    I have enabled reporting (under compliance reporting in the policy) and alerting on the features that are enabled in the policy. When I go to the "view reporting" to open reports, all items state "no data". Some reports enabled include "sytem integrity - Anti Virus", "device inventory - USB devices".
    Also, reports are set to generate every 2 hours in the policy.
    Any help is appreciated...

    Originally Posted by dchiara
    Try going to Tools Configuration in the Management Console and use the service synchronization feature to force the sql databases to sync.
    When I first went into the service sync window... It indicated over 800 report packages queued for replication. I hit Syncronize about 15 minutes ago. It is now showing 775 packages queued. My report checking for machines was set to every two hours. Only about 10 machines assigned to this policy so far.
    I am seeing a large amount of Senforce database type errors in the App log on the server. Here is an example:
    Event Type: Error
    Event Source: Senforce Management Service Agent 3.0
    Event Category: None
    Event ID: 0
    Date: 8/12/2008
    Time: 8:30:21 AM
    User: N/A
    Computer: HQZES1
    Description:
    General Information
    Additional Info:
    ExceptionManager.MachineName: HQZES1
    ExceptionManager.TimeStamp: 8/12/2008 8:30:21 AM
    ExceptionManager.FullName: Microsoft.ApplicationBlocks.ExceptionManagement, Version=1.0.1616.15402, Culture=neutral, PublicKeyToken=null
    ExceptionManager.AppDomainName: managementserveragent.exe
    ExceptionManager.ThreadIdentity:
    ExceptionManager.WindowsIdentity: NT AUTHORITY\SYSTEM
    1) Exception Information
    Exception Type: System.ApplicationException
    Message: The package 57d30872-a718-4237-abcc-fd448a23d822 was unable to be processed and has been returned to the queue. The exception was: Conversion failed when converting from a character string to uniqueidentifier.
    TargetSite: NULL
    HelpLink: NULL
    Source: NULL
    2) Exception Information
    Exception Type: System.Data.OleDb.OleDbException
    ErrorCode: -2147217900
    Errors: System.Data.OleDb.OleDbErrorCollection
    Message: Conversion failed when converting from a character string to uniqueidentifier.
    Source: Microsoft OLE DB Provider for SQL Server
    TargetSite: Int32 Update(System.Data.DataRow[], System.Data.Common.DataTableMapping)
    HelpLink: NULL
    StackTrace Information
    at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
    at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable)
    at Senforce.Security.MobileManagement.AuthenticationS erver.AuthenticationAgentServices.ImportPackageDat a(OleDbTransaction importTransaction, MemoryStream packageData, String packageTypeName)
    at Senforce.Security.MobileManagement.AuthenticationS erver.AuthenticationAgentServices.ReplicateClientD ata()

Maybe you are looking for

  • Printing Exception when print to printer on a remote location

    <p>Hi,</p><p> I have a weird printing problem for a report created from report designer and printed from a JSP page created using CR4E. Any help or suggestions are very appreciated.</p><p>From CR4E and uses Tomcat 5.0, I'm opening a report created fr

  • What was that shortcut to "repair" a doc.  and listen for a number of beeps?

    Anybody remember that? I have ghosting edge sections of non-printing images of deleted excel files and am hoping that might purge some of these ghosts. Something to do with "paragraph".

  • Error in survice

    Hi All, I am using HFM 11.1.1 through VM ware and i am getting error while running '' hyperion EPM architech - process manager" like as below the " hyperion EPM architech - process manager" services on local computer started and stopped. some survice

  • E71 - Deleted all calendar entries in error

    I have been a plonker.  I somehow managed to delete all my calendar entries and did not have a recent backup. Any ideas if they are recoverable and if so how? Thanks Stuart 

  • Premiere CS4 crash when import

    Hi. I'm having trouble with premiere. I start it and when i import file, it imports, and then strarts workin and freezes.. I'm using Mac Leopard 10.5.6, QuadCore q6600, 4gbRAM, 620GB sata2 hdd, gef9400gt.. It's quite annoying i cant edit my jobs, cou