开发者

Get Identity Column Value in C# 'Dataset'--Access DataBase

I want to retrieve identity column value after running Insert or Update (using Access DB in C#). How can I do it?

i use a Typed dataset to fill and 开发者_如何学Goupdate...


For retrieving the identity of inserted rows see this link:

http://msdn.microsoft.com/en-us/library/ks9f57t0%28VS.80%29.aspx

This link describes how to find the value of an inserted row in SQL, you then need to return that row in a SELECT statement (as Access does not support return parameters)

You may also be interested in this question, which compares the different methods of returning the identity.

Best way to get identity of inserted row?


(sorry I cannot post a comment)
It sounds to me like he is using an ADO.net DataSet, and wants to retrieve an the value of an auto-increment column after inserting a value.
I don't know where you are all getting partial classes from, he's saying he can't figure out how to do it in C#, not that he doesn't want it in C#.


Ms-Access C# connectivity for insertion deletion updation for identity column

Tutorial


In Find answer of My Question

the Flowing Links Helped me to write a partial Class to Validate Rows in Dataset And Write a Code to Recive a AutoIncrement Column Value:

http://msdn.microsoft.com/en-us/library/ms171896(VS.80).aspx

http://msdn.microsoft.com/en-us/library/0f7ey06d(VS.80).aspx

http://msdn.microsoft.com/en-us/library/1120xds5(VS.80).aspx

thank you

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜