Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdapter and PostgreSQL Problem
Message
From
22/10/2003 16:59:02
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00840453
Message ID:
00841296
Views:
36
Hi Simon,

You have to set UpdatableFieldList property as well. Try to set it as follows:
UpdatableFieldList = "id, desc"
Just a tip for troubleshooting: you can use BeforeInsert event to check if command is generated and how does it look like.

Thanks,
Aleksey.

>Hi Alexsey
>
>I have not yet been able to make the automatic Insert work. I tried using
>
>KeyFieldList="id"
>Tables=["uptable"]
>UpdateNameList=[id "uptable"."id",desc "uptable"."desc"]
>
>and
>
>KeyFieldList="id"
>Tables="uptable"
>UpdateNameList=[id uptable."id",desc uptable."desc"]
>
>but no success.
>
>If I use:
>
>? SQLExec(1,[Insert Into "uptable" ("id","desc") values ('0000004','test')])
>
>it works fine. Note that single quotes are required around the values and double quotes around the field names. The table name can either be quoted or not.
>
>What would be the correct form of the InsertCmd if I was to create it manually.
>
>Thanks
>Simon
>
>
>>Hi Simon,
>>
>>>What confused me was that the documentation had
>>>
>>><remote table name>, <remote field name>,
>>>
>>>
>>>I think it should read:
>>>
>>><remote table name>.<remote field name>,
>>>
>>>
>>
>>You are right, there is a mistake in help topic for UpdateNameList property.
>>
>>>I also do not know exactly where it mentions about the field decoration.
>>>
>>
>>Field name decoration is not a CursorAdapter requirement, it is a backend requirement. For example, [desc] is a SQL key word that can be used in ORDER BY clause. If you want to use it as a field name, PostgreSQL requires to use quotation marks to decorate it. I this scenario, < remote field name > should be decorated field name because decoration is a part of the name and CursorAdapter has no idea whether and how the decoration should be applied (each backend has its own rules).
>>
>>Were you able to make it work?
>>
>>Thanks,
>>Aleksey.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform