CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2001
    Posts
    13

    ADO Query generation

    Hi,

    Can anyone tell me whether it is possible to specify that the queries generated by MS ADO Data Control be based on the primary key. Also, is their some way to manually specify a primary key in a recordset and then ask the control to use that key in generating the queries?



  2. #2
    Join Date
    Sep 2001
    Location
    Little Rock, Arkansas
    Posts
    40

    Re: ADO Query generation

    I'm not sure if this answers your question, but maybe it will help you find your answer:

    You can specify that a recordset base its update criteria on a primary key by using the following syntax. Look up "adCriteriaKey in the help file for more details:
    rs.Properties("Update Criteria") = adCriteriaKey

    You can't manually specify the primary key in a recordset if its coming from a server. If you need to find out what the primary key of a table is dynamically, you can call the sp_pkeys stored procedure.


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

Featured