Easy ADO.net question

J

Jonathan Miller

I'm a bit new to ADO.net, so here's my setup. I'm programming in vb.net I have a strongly typed dataset with sqlserver data in it. I want to edit a row in a table by referring to it by its' primary key. How the heck do I do that? dataset.strongtablename.item(primary key) = somedata This is how I think it should work, but it doesn't, the item collection does'nt care about the primary key and its read only! This seems like such a simple task, any help would be greatly appreciated!
 
G

Greg Low \(MVP\)

Jonathan,

You can use the Find method to locate the row.

HTH,

--
Greg Low (MVP)
MSDE Manager SQL Tools
www.whitebearconsulting.com

Jonathan Miller said:
I'm a bit new to ADO.net, so here's my setup. I'm programming in vb.net
I have a strongly typed dataset with sqlserver data in it. I want to edit a
row in a table by referring to it by its' primary key. How the heck do I do
that? dataset.strongtablename.item(primary key) = somedata This is how I
think it should work, but it doesn't, the item collection does'nt care about
the primary key and its read only! This seems like such a simple task, any
help would be greatly appreciated!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top