473,543 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mssql To Xml

2 New Member
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 1965
jhardman
3,406 Recognized Expert Specialist
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 fileSystemObjec t. 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
stonetherippa
2 New Member
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
4378
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 try to used normal working file that store BLOB as file type in MSSQL ...but still not working. Is it because the image data type in MSSQL can not...
7
23860
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 tracks jobs for me, and we
1
2101
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
2452
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 date and time values from given range. The difficulty is mainly caused by the fact, that Date and Time is stored in separate rows as String . I've...
3
4303
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 #1 MSSQL 2000 sp4 Windows 2000 Server PHP4 on IIS5 (CGI)
11
31732
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 http://groups.google.com/group/mailing.www.php-dev/browse_thread/thread/69f90dc978763e99/d61aa0bd48de23f0?lnk=st&q=php+mssql+utf-8&rnum=7#d61aa0bd48de23f0 i tried as well the odbtp library, odbc and...
0
1507
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 depositing user name and passwords for MSSQL of the server in "connection string" (with open text) b) Windows Authentication and to send rights to SQL...
8
6320
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 now the mssql functions are significantly slower. On the Windows 2000 machine, the mssql_connect takes .03 seconds to run, and the odbc_connect takes...
0
1437
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 tried installing MSSQL 2005, it allows only the client tools. I have revert the process and successfully install MSSQL 2005 server but now the MSDE...
14
2907
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 MSSQL 2k (SP4) on server 2 (using ASP). I can load a basic 'Hellow world' PHP page hosted on server1 but when I add the code to create a simple...
0
7412
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7594
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7746
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7356
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5889
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5285
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4899
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1830
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
979
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.