I have a problem with ADO/MSSQL, zeos 6.6.3, delphi 7
[font=Courier New]ZConn.StartTransaction;
ZConn.ExecuteDirect( 'insert..' ); // insert new record
Query.Open; // to findout ID of newly inserted record, Query.Connection=ZConn
id:= QueryID.asInteger;
Query.Close;
ZConn.ExecuteDirect( 'update..' ); // update some record
ZConn.Commit;
[/font]
in row ExecuteDirect( 'update..' ) i got error:
Cannot create new connection because in manual or distributed transaction mode
when there is no 'select' in transaction, there is no error
Microsoft explains this error:
The DBPROP_MULTIPLECONNECTIONS property on the data source is set to VARIANT_TRUE
but I don't know how to set or change this property
I've tried :
[font=Courier New]ZConn.Database:=
'Provider=SQLOLEDB.1;'+
'Persist Security Info=False;'+
'User ID='+User+';'+
'Initial Catalog='+Database+';'+
'Data Source='+HostName+';'+
'Isolation Level=4096;'+
'DBPROP_MULTIPLECONNECTIONS=0';
[/font]or
[font=Courier New]'DBPROP_MULTIPLECONNECTIONS=VARIANT_FALSE'; [/font]
but it doesn't work, ZConn.Properties don't work too
does anybody know how to set or change ADO connection properties?
thanks
problem with ADO property (for MSSQL)
Moderators: gto, cipto_kh, EgonHugeist