Hi Vladimir,
so I go to ask ...
1) To prevent problems with null values I create all (possible) columns 'not null' with default value. I don't know, what with datetime values. VFP '{}' value can be only stored as null value.
2) I try to use only SPT. It works fine, but I don't know what with large Memo fields.
3) Sequences are simple, but,
a) if I want (after Insert) to get new value for PK, I must do something like:
'insert into table (PK,..) values (tablesequence.nextval,..)'
and 'select tablesequence.currval from dual'
b) If I want insert into 2 tables, can I do it this way:
=sqlsetprop(handle,'transactions',2)
'insert into table1 (PK1,..)'
'select table1sequence.currval from dual'
'insert into table2 (PK2,table1.PK1,..)'
=sqlcommit(handle)
and what when any SqlExec failed ?
3) When I make Delete or Update, how can I obtain number of affected rows (MSSQL @@RowCount) ?
4) In VFP I never use transactions, I always flock tables. So I try:
VFP session1:
sqlsetprop(handle,'transactions',2)
sqlexec(handle,'lock table MyTable in exclusive mode')
VFP session2:
sqlexec(handle,'update MyTable set ..') - waiting
VFP session1:
quit without SqlCommit
Computer freeze, so 'Ctrl+Alt+Del' and after restart is MyTable still in exclusive mode. How to set QueryTimeOut, ConnectTimeOut and other ?
Thanks, Pavel
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only