473,405 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Mssql To Xml

Hello I have tryed to store the data from my db in a XML File But it doesnt create the File and it says Data Time Out:-(
Ps have just Searched on this Forum but there is nothing that helps me out mybe can help me anyone?
Here is the Code:
Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3.  
  4.  
  5. <html>
  6.  
  7.  
  8.  
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  11. <title>Neue Seite 1</title>
  12. </head>
  13.  
  14. <body>
  15.  
  16. <%
  17.     Dim conn
  18.     Dim rs
  19.  
  20.    Set conn = server.createObject("ADODB.Connection")
  21.     on Error Resume Next
  22.     SSN = Request.QueryString("SSN")
  23.     ' Verbindung zur Datenbank herstellen
  24.     conn.open "PROVIDER=SQLOLEDB;SERVER=123;ADDRESS=212,1234;UID=werer;PWD=666;DATABASE=MydB;"
  25.  
  26.    set rs=Server.CreateObject("ADODB.recordset")
  27.  
  28.    rs.Open "SELECT * FROM Betriebsdaten for XML", conn 
  29.      do until rs.EOF
  30.     for each x in rs.Fields
  31.      Response.Write(x.name)
  32.      Response.Write(" = ")
  33.      Response.Write(x.value & "<br />") 
  34.    next
  35.    Response.Write("<br />")
  36.    rs.MoveNext
  37.   loop
  38.  
  39.  rs.close
  40.  conn.close
  41. %>    
  42.  
  43. </body>
  44.  
  45. </html>
Oct 26 '07 #1
2 1963
jhardman
3,406 Expert 2GB
Right, so there are a couple ways to do this. I tend toward the do-it-yourself end of the spectrum, put the data into a long string including XML tags and save it to a text file using the textStream and fileSystemObject. That's how we had to do it back in my day when we used to have to write our code in clay with mallets and wait for some flunky with an abacus to render webpages.

Nowadays there is an XML server object provided, but I haven't used it to save XML files, and I would have to look it up to get it right. Since I know the syntax of the XML file it is just easier for me to write it by hand than rely on the server object.

Jared
Oct 27 '07 #2
hi Thx for reply u can maybe make me an example=?
Oct 29 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: badz | last post by:
Hi frenz Lately I try to use MSSQL and PHP , the problem arise when PHP try to read MSSQL field with 'image' data type, header("Content-type: image/jpeg"); // act as a jpg file to browser I...
7
by: mj | last post by:
Hello, thanks for the help. I am running a WinXP Pro w/ SP2 (my home computer, with ZoneAlarm firewall) Apache 2.0.52 MySQL 4.1.7 PHP 5.1.0-dev I have developed a PHP/MySQL web app that...
1
by: JackTorrance | last post by:
Hi i have a problem with IIS6 and MSSQL and i hope that someone can help me. this is the configuration: Windows 2003 IIS6 MSSQL 7.0 Standard Edition ADO 2.5
14
by: Kukurydz | last post by:
I've got such problem: My database is stored on MSSQL Server. I have to write reports for it in MSAccess. I've got a problem with creating a query which will select records from MSSQL table with...
3
by: gharmel | last post by:
I'm trying to get some clues on why I get (much) slower responses from my PHP applications when dealing with a remote sql server as opposed to a local sql server. Here's my situation: Server...
11
by: ralphie | last post by:
hi all since nearly 2 days i fight with mssql and utf-8 as i need to store and retrieve arabic characters. i tried the com approach ...
0
by: DariuszK | last post by:
I am greeting I would like to consult the better solution(with security consideration) to the access is for MSSQL(2005) from ASP(Classic) in the system of the intranet. a) SQL mixed mode and...
8
by: php-taz | last post by:
I built a PHP website on Windows 2000 (using IIS) that connects to a SQL Server 2000 database using the mssql functions. I migrated the website and the database onto a Windows 2003 machine, and...
0
by: Derftics | last post by:
Hi Guys, Is there anyone who have tried installing MSSQL 2000 and MSSQL 2005 servers in one desktop computer? I have tried using MSDE and successfully install the MSSQL 2000 server but when I...
14
by: guswebb | last post by:
Hi. I'm a newbie to PHP and am having a few problems as follows... I have installed PHP successfully on server 1 which is running IIS 6 (W2k3) and hosting multiple sites, some of which connect to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.