N
2004-04-23T12:00:00Z
Demo version; Succesfully connected and set up primary key OCS_ID with Select statement.
( select (max(ocs_ID) +1) from OLContacts )

5 contacts successfully stored into table (your demo version with all fields).

When checking the 'all fields' view on one of the 5 contacts (in Outlook) the OCPRIMNAMES field has a value of "OCS_ID" rather than the primary key number (Number 0 0⃣ in the database table).
OCPRIMVALUES is blank or empty.

My plan was to use only a few fields in Access table (for ease of upkeep and speed).
So I deleted the fields I didn't want from the Contacts table. OCS_ID was left intact.

I then amended the number 0 0⃣ contact's phone number, went back to Outlook, selected it and tried "Load Item" to test the connection in reverse.
Received error message "no primary keys available for this contact".

Is the error message somehow connected with the deletion of the fields I did not wish to use?
(I assume the Access database table need only have the fields I plan to use within my database rather than all of them)
Neil
Administrator
2004-04-23T14:24:00Z
Neil,

this problem can occur when the table is empty (no records) and the
"select (max(ocs_ID) +1) from OLContacts" return empty (NULL) value.
When using for example MS SQL Server the statement can be changed to:
select ISNULL(max(ocs_ID)) +1 from OLContacts.

When using MS Access the statement can be changed to:
select Iif(max(ocs_ID)is null, 1,max(ocs_ID) + 1) from OLContacts

You can also define a VIEW (query in MS Access) that will return the right value and use this VIEW in Outlook Connect as replacement for the max statement.
Example:
select nextid from MyView
N
2004-04-24T08:29:00Z
I cleared all the records on the OLContacts database and reset it.
Then I added a single dummy record for OCS_ID =0 (zero). First name = 'dummy'. last name = 'record')

Then I "stored" the 5 contacts from OL to Access.
I got the security prompt (don't you utilise the 'Redemption' workaround for this situation?)

After success I look in the Access table and there are only 4 of the 5 contacts, plus a blank record (OCS_ID = 0 zero). This zero record has none of the data I added initially.

Will I always get the security prompt even with auto synchronise?

I am not au fait with SQL so your suggestion of "Select NextID from MyView" doesn't mean a lot. I can create a query (view) but how does NextID relate to OCS_ID?

Neil

Administrator
2004-04-26T09:33:00Z
For the security messages please see forum:
http://support.geniusconnect.com/Posts/t45- 

The NextID can be some MS Access specific statement.
select MyQuery... as NextID from ....
Administrator
2005-10-05T16:59:00Z