Results 1 to 3 of 3

Thread: How to generate PK cell based on multi field values of DGV ?!

  1. #1

    Thread Starter
    Lively Member HOTFIX's Avatar
    Join Date
    Sep 2008
    Posts
    91

    Question How to generate PK cell based on multi field values of DGV ?!

    Hi…

    I’ve got vb.net form connected to MS database (.mdb)…
    I set data type some columns of DGV to int32 with certain formats…
    For instance:
    Col 1 value:00000078
    Col2 value:011
    Col3 value:0005

    I would like “col 4” to be set as a primary key:
    Col 4 value (PK) will result: 000000780110005

    So what the codes to generate primary key based on values joined from multi-columns cells for data grid view?!

    Hope My Q is clear !

    Best Regards…

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: How to generate PK cell based on multi field values of DGV ?!

    look up a "computed column" ... they are fairly easy to create... and then you can apply a PKey index to it.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Lively Member HOTFIX's Avatar
    Join Date
    Sep 2008
    Posts
    91

    Re: How to generate PK cell based on multi field values of DGV ?!

    Quote Originally Posted by techgnome View Post
    look up a "computed column" ... they are fairly easy to create... and then you can apply a PKey index to it.

    -tg
    THANKS...

    I'll try look for "computed column"...

    Best Regards...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width