Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

when I Import a row like (Dataset.table.importrow(iRow)), which is also shown in my datgrid after importing, it isn´t affected on updating my Datasource. Otherwise, when I use Me.Databinding(***).removeat(int) in the same dataset, the update takes place and is also visible in my datagrid.

#

Any idea why ???

Sometimes you´ve got to make a silent Takedown .
Posted
For sure I do the update after the import of the rows. The update on removed rows works, but on the imported ones it doesn´t take effect.
Sometimes you´ve got to make a silent Takedown .
  • *Experts*
Posted

Maybe try ds.Tables[0].Rows.Add(datarow) instead of ImportRow?

 

-nerse

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

Now I receive an errmsg like this(translated): Insert Row not possible. This Row already belongs to another table.

 

I got several tables in my Db with a similar structure and no relations are set.

 

Can´t find help in msdn or knowledge base.

Sometimes you´ve got to make a silent Takedown .
Posted

myRow = Dataset_PAM1.PAM.Item(ctr)

objDataset1.Tables("PAMListe").Rows.Add(myRow)

 

After ***.add(myRow) error occurs. :o

Sometimes you´ve got to make a silent Takedown .
Posted

Solved !!!!

 

Hey jou !!!

 

I did it !!!!!

 

I took your suggest as written above, wich didn´t work properly at first for me. But the Parameter made it. Instead of a DataRow, the method also accepts an Object of values to add. So I put the row of my source table into an ObjectArray(lots of code) and took it as parameter for the **.add() method.

 

Watch this :

 

Dim DRow(24) As Object

Dim myRow As DataRow

myRow = Dataset_PAM1.PAM.Item(ctr)

REM Put colfield in Array field

DRow(0) = myRow("TicketID") REM colname

DRow(1) = myRow("Name") REM Do this until all cols are filled in Array -- and finally :

 

objDataset1.Tables("TABLENAME").Rows.Add(DRow)

 

 

I don´t know why, but it works fine now. No idea why alternatives above failed.

 

So what. Thanks for your help. Hope Topic will give advise to someone else later in a galaxy far far away ..... :D

Sometimes you´ve got to make a silent Takedown .

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...