problem with ADO property (for MSSQL)

Forum related to ADO

Moderators: gto, cipto_kh, EgonHugeist

piotrg
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 06.03.2007, 21:32

problem with ADO property (for MSSQL)

Postby piotrg » 04.09.2008, 12:55

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

Return to “ADO”

Who is online

Users browsing this forum: No registered users and 1 guest