RE: SQL Query using Linked Server MSSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Robert,
 
This is the message I'm getting. 
 
"Cannot specify an index or locking hint for a remote data source."
 
This is how my code looks like.
$sql="Select * From [1.1.1.1.].MyDB.dbo.MyTable";//      echo $sql;
$result=mssql_query($sql);
echo mssql_get_last_message();$num=mssql_num_rows($result);
 
If you can make anything out of this piece of code and suggest me something else. That'll be great.
 
Thanks for your time.
Ankit
 


To: php-objects@xxxxxxxxxxxxxxxxxxx: ratkinson@xxxxxxxxxxxxxxxxx: Mon, 9 Jun 2008 09:47:42 +0100Subject: RE:  SQL Query using Linked Server MSSQL




Try switching on all errors and outputting the info from'mssql_get_last_message()'Rob. -----Original Message-----From: php-objects@xxxxxxxxxxxxxxx [mailto:php-objects@xxxxxxxxxxxxxxx] OnBehalf Of Ankit MathurSent: 09 June 2008 09:42To: php-objects@xxxxxxxxxxxxxxxxxxxxxx: RE:  SQL Query using Linked Server MSSQLHi Robert,My linked server is working perfectly fine. When I use the similar query inQuery Analyzer I do get the desired resultset.Issue is using the query and displaying results with PHP.Any ideas/suggestions for use with Php?Ankit MathurTo: php-objects@xxxxxxxxxxxxxxxxxxx: ratkinson@xxxxxxxxxxxxxxxxx: Mon, 9 Jun2008 09:02:46 +0100Subject: RE: [php-objects] SQL Query using Linked ServerMSSQLTry these 2 threads:-http://blogs.microsoft.co.il/blogs/natkin178/archive/2008/02/04/sql-select-on-several-different-tables-that-are-in-different-databases-and-on-different-servers-that-are-not-in-the-same-subnet-mask.aspxhttp://groups.google.com/group/comp.databases.ms-sqlserver/browse_frm/thread/3400597e12e9adbc/ae792582b71f2eb8?lnk=gst&q=select+from+multiple+databases#Rob.-----Original Message-----From: php-objects@xxxxxxxxxxxxxxx[mailto:php-objects@xxxxxxxxxxxxxxx] OnBehalf Of Ankit MathurSent: 09 June2008 08:53To: in-phpug@xxxxxxxxxxxxxxx;phpexperts@xxxxxxxxxxxxxxx;php-objects@xxxxxxxxxxxxxxxxxxxxxx: [php-objects]SQL Query using Linked Server MSSQLHi All,We has major DB revamp and as aresult of it some of my tables have beenshifted to another DB.Now I have touse a Linked Server from the DB I earlier used to fecth data.The syntax I'musing is Select * From [1.1.1.1.].MyDB.dbo.MyTableNow I'm neither getting aresult nor an error.Can someone help me on this?Any workarounds ? Anyfunctions that can help me get what is stopping thedata to comeby?ThanksAnkitMathur__________________________________________________________2000Placements last year. Are You next ? Findouthttp://ss1.richmedia.in/recurl.asp?pid=499[Non-text portions of thismessage have been removed]------------------------------------Are you lookingfor a PHP job? Join the PHP Professionals directoryNow!http://www.phpclasses.org/professionals/Yahoo! GroupsLinks***********************************************************************************Any opinions expressed in email are those of the individual andnot necessarily those of the company. This email and any files transmittedwith it are confidential and solely for the use of the intended recipient orentity to whom they are addressed. It may contain material protected byattorney-client privilege. If you are not the intended recipient, or a personresponsible for delivering to the intended recipient, be advised that youhave received this email in error and that any use is strictlyprohibited.Random House Group + 44 (0) 20 78408400http://www.randomhouse.co.ukhttp://www.booksattransworld.co.ukhttp://www.kidsatrandomhouse.co.ukGeneric email address -enquiries@xxxxxxxxxxxxxxxxxxxxx & Registered Office:THE RANDOM HOUSE GROUPLIMITED20 VAUXHALL BRIDGE ROADLONDONSW1V 2SARandom House Group Ltd isregistered in the United Kingdom with company No. 00954009, VAT number102838980*********************************************************************************** __________________________________________________________Watch hottest Bollywood videos, clips, movie tailors, star interviews, songsand more on MSN videos.http://video.msn.com/?mkt=en-in[Non-text portions of this message have been removed]------------------------------------Are you looking for a PHP job? Join the PHP Professionals directory Now!http://www.phpclasses.org/professionals/Yahoo! Groups Links 






_________________________________________________________________
2000 Placements last year. Are You next ? Find out
http://ss1.richmedia.in/recurl.asp?pid=499

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux