Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 12th, 2004, 06:20 AM
Authorized User
 
Join Date: Apr 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem saving Recordset (adPersistXML)

Hi there,
I am having a problematic date format when I save a Recordset into xml format using the following code:

Set rsTitles = CreateObject("ADODB.Recordset")
rsTitles.Open "Select brand, date_of_sale from cars"
rsTitles.Save szFile, 1 'adPersistXML

The output xml file contains a "strange" date format since between the date and time exists a "T"

date_of_sale='2001-06-11T11:47:00'

Any ideas what might go wrong?!

Regards,
Theodore.


 
Old May 12th, 2004, 06:26 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

What is you SQL server dateformat?
You got to change you SQLserver dateformat I believe

Or this may help

Select brand, convert(varchar(25),date_of_sale,121) from cars

Cheers!


-Vijay G
 
Old May 12th, 2004, 06:43 AM
Authorized User
 
Join Date: Apr 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Vijay,
I didn't try the "121" option, but it did the work!

Regards,
Theodore.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with saving a file nelly78 .NET Framework 2.0 3 October 24th, 2008 01:09 AM
Image saving problem OLEDB aliirfan84 ASP.NET 2.0 Professional 0 June 25th, 2007 06:28 AM
Saving Date problem suhabassam JSP Basics 0 September 25th, 2005 01:50 AM
.Net File Saving Problem vinod_pawar1 General .NET 1 July 4th, 2004 09:30 PM
problem while saving the excel sheet icyindian Pro VB 6 3 September 20th, 2003 01:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.