|  | Posted by Paul Lautman on 01/20/08 14:15 
Jerry Stuckle wrote:> Paul Lautman wrote:
 >> I need to get some data from a MSSQL database via an asp server, to
 >> display in a php generated page. I don't want to pre-format the data
 >> from a display pov, as that means going to the asp server whenever I
 >> want to change it.
 >> This data will be a few information fields (e.g.
 >> total_number_of_rows_found, number_of_rows_per_page,
 >> current_page_number) plus the columns/rows actually returned by the
 >> query (I guess I really only need to know total_number_of_rows_found
 >> as I will be supplying the other information as input parms, but
 >> this gives the general idea).
 >> I am pleasantly in the exact opposite situation as normally found
 >> here, in that I can control the sending asp script as well as the
 >> receiving php one (although, whilst I may not be anywhere near an
 >> expert php programmer, my php/MySQL skills far outweigh my asp/MSSQL
 >> ones!).
 >> An obvious choice of communications protocol is xml, but does anyone
 >> have any other ideas of neat ways to package up the data at the asp
 >> end, to make it easy to access over on the php side?
 >>
 >>
 >>
 >
 > Paul,
 >
 > I've found xml is about the best for things like this.
 >
 > I implemented something similar for a non-profit a while back.  Their
 > local chapters needed access to a subset of the database, but they
 > didn't want to make the database accessible via the internet.  So I
 > just built some xml2 pages for them to fetch and supplied some cURL
 > code for them to get what they wanted.  The DOM functions in PHP
 > allowed them to parse the data as they wished.
 >
 > The only real problem was building "well-formed" xml.  I didn't find
 > any good tools for VBScript for building the xml, but it wasn't all
 > that hard.
 
 Good old Microsoft (one doesn't often have a reason to say that!) has got
 the best summary of that that I have found:
 http://support.microsoft.com/kb/281099
 
 I was sort of wondering about a JSON style protocol, only in php speak,
 except that that would I guess entail an eval(), which maybe isn't the best
 approach.
  Navigation: [Reply to this message] |