Forum  Core :: SDK (Vi...  Developing the ...  get autonumber from a tableadapter insert
Previous Previous
 
Next Disabled
New Post 10/14/2011 10:37 AM
  gaagaagui
24 posts
No Ranking


get autonumber from a tableadapter insert 

After calling the table adapter method "Insert(...)", How can I access the autonumber (autoincremented primary key) of the newly inserted record?

 
New Post 10/15/2011 5:51 AM
  palli
11824 posts
1st Level Poster




Re: get autonumber from a tableadapter insert 

Hi,

This is a pure ADO.NET question, so please revert to MSDN documentation for ADO.NET. You can for instance see this MSDN article here.

Hope this helps,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 10/15/2011 8:18 PM
  gaagaagui
24 posts
No Ranking


Re: get autonumber from a tableadapter insert 

I already know how to get the autonumber via ADO.NET.   I'm surprised you don't provide the autonumber in the return value of the Insert():

0=failure, >0 is success and the autonumber

I'm guessing the reason lies in the engine that drives the autogenerated table adapter code.  Oh well.  Thanks so much for the reply and please consider this case closed.  Thank you.

 
New Post 10/17/2011 2:05 PM
  palli
11824 posts
1st Level Poster




Re: get autonumber from a tableadapter insert 

Hi,

You are welcome,

However, I am not exactly getting your point here. Please clarify what control you are talking about in this context of Insert() returning the autogenerated identity number, because if you are indeed talking about the tableadapter(s), then those are not modified in any way by Visual WebGui and when you use them, you are using .NET components, not Visual WebGui ones.

I must be badly misunderstanding you here, and I apologize up front for that misunderstanding.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 10/17/2011 8:44 PM
  gaagaagui
24 posts
No Ranking


Re: get autonumber from a tableadapter insert 

No...you understood perfectly.  It was I who did not understand what I was asking.  I am pretty new at Visual Studio.  This is my first crack at developing anything outside console applications and I was under the impression that VWG had something to do with the autogenerated dataset/tableadapter vb.net scripts.  I now realize it does not.  I have already figured out the solution to my problem., so I thank you for your help and I apologize if I wasted your time.

 
Previous Previous
 
Next Disabled
  Forum  Core :: SDK (Vi...  Developing the ...  get autonumber from a tableadapter insert
CompanionKit Bottom
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS