|
-
September 24th, 2001, 01:39 AM
#1
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?
-
September 24th, 2001, 07:13 AM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|