![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
hi i would like to give each record in my application a uniqe identifier how can i generate it ? how to use system.guid to generate ? |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Hi Ammar, Thanks for your reply. Here is the code sample to use GUID in VB.net Dim g As Guid = Guid.NewGuid() ' Generate GUID string Dim guidStr As String = g.ToString() ' Generate GUID byte array Dim guidByte As Byte() = g.ToByteArray() Are you using database in your application? If yes, to use incremental ID in all records, usually, we use a table which is responsible to generate unique id for all other records. The ID table only has one incremental ID column. Every time a new record is created, we insert one item in ID table and get its ID to assign it to the new record. Thanks, Hongye Sun (hongyes (AT) online (DOT) microsoft.com, remove 'online.') Microsoft Online Community Support Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg (AT) microsoft (DOT) com. This posting is provided "AS IS" with no warranties, and confers no rights. |
#6
| |||
| |||
|
#7
| |||
| |||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |