Greetings All, I posted this on Friday but now I have cut it down to make it readable and stand alone
W2K server MS SQL 2000 PHP 4.2.1 (in CGI mode) I have a valid bit of SQL, but PHP does not correctly run it below is bit of code ==========8<============================================================= <? define("Server","xxxxxxxxx"); define("User","xxxxxx"); define("PWord","xxxxxx"); mssql_connect(Server,User,PWord); $ExcQry = " begin transaction set nocount on declare @PerID int insert into Item (ItemTypeid,Name,LastUpdated,LegacyId) Values(42,'CCompanyName',Current_timestamp,'".date ("mdGis")."') set @PerId = @@identity insert into person (ItemId,CompanyName,FirstName,LastName) Values (@PerId,'PCompanyName','PFirstName','PLastName') set nocount off commit select @PerId itemid "; $Result = mssql_query($ExcQry); list($ItemId)=mssql_fetch_row($Result); echo $ItenId; ==========8<============================================================= The code does get passes and run as there are results in the database, but I get no result set back. I have also run it in the query analyser, it runs. I have also watched it in the profiler and seen it work. -- BBFN, _______________________________________________ David | David Elliott | Software Engineer | _________________________| [EMAIL PROTECTED] | PGP Key ID 0x650F4534 | | Don't be a baby. I know what I'm doing. --Wednesday. | -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php