Hi,

I'm doing the following :
----------------------------
lcStrConn = 'Driver=SQL Server;Server=MyServer;Database=MyDB;UID=sa;PWD=sa'
Handle = sqlstringconnect(lcStrConn)

SQLSetProp(Handle, 'Asynchronous', .F.)
SQLSetProp(Handle, 'BatchMode', .T.)
SQLSetProp(Handle, 'DispLogin', 1)
SQLSetProp(Handle, 'DispWarnings', .T.)
SQLSetProp(Handle, 'Transactions', 2)

SQLPrepare(Handle, 'select * from dbo.MyFile', 'MyFile')
? sqlexec(Handle)

CursorSetProp('Buffering', 5, 'MyFile')
CursorSetProp('FetchAsNeeded', .F., 'MyFile')
CursorSetProp('MaxRecords', -1, 'MyFile')
CursorSetProp('WhereType', 1, 'MyFile')
CursorSetProp('SendUpdates', .T., 'MyFile')
CursorSetProp('UpdateType', 1, 'MyFile')
CursorSetProp('Tables', 'dbo.MyFile', 'MyFile')
CursorSetProp('KeyFieldList', 'MyFileId', 'MyFile')
CursorSetProp('UpdatableFieldList', 'MyFileDescripcion', 'MyFile')
CursorSetProp('UpdateNameList', 'MyFileId dbo.MyFile.MyFileId, Codigo
dbo.MyFile.MyFileCodigo, Descripcion dbo.MyFile.Descripcion,
AplicacionId dbo.MyFile.AplicacionId', 'MyFile')
-------------------------------------------------

Now before doing anything else I switch to the MSSQL Query analyzer and
perform :
update dbo.Myfile set Descripcion = 'Changed value' where MyFileId = 1

-------------------------------------------------

replace Descripcion with 'Whatever'
? descripcion
? getfldstate(-1, 'MyFile')
--------------------------------
So far so good
--------------------------------

? TableUpdate(.T., .F., 'MyFile')

---------------------------------
this last statement returns .T.
It should have returned .F. as the 'Force' parameter for TableUpdate was
sent as .F.
Then, when I do SQLCommit(Handle) it steps over the change I had done in
the Query analyzer.

I'm clearly setting something wrong. Any ideas?

TIA






_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to