Showing posts with label save. Show all posts
Showing posts with label save. Show all posts

Friday, March 9, 2012

Help using sp_xml_preparedocument

Hi all,

We are using a VB component to create and save an XML document on our
local LAN.

We want to load this straight into a DB Table using a query based on
OPENXML. Trouble is, the sp_xml_preparedocument command always throws an
error.

Here is some code:

>>>> CODE >>>>
DECLARE @.idoc int
DECLARE @.doc varchar(1000)

EXEC sp_xml_preparedocument @.idoc OUTPUT, @.doc
<<<< END OF CODE <<<<

where @.doc is the filename of our file on the LAN to be opened, and
@.idoc is the handle to be created.

the error is:
XML parsing error: Invalid at the top level of the document.

Here is some of the XML Document saved on the LAN that should be opened
by sp_xml_preparedocument and prepared.

<?xml version="1.0" encoding="UTF-8" ?>
<xdata created_by="OSA" created_at="Thu Nov 13 11:33:33 EST 2003">
<rows row_count="1000">
<row>
<COL1>714761905</COL1>
<COL2>714761905</COL2>
<COL3>714761905</COL3>
</row>
</xdata
Any advice or tips whould be very helpful...

thanks

Phil

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!The xml doc you posted is not well-formed; it is mussing the </rows> end
tag. In any case, the @.doc parameter specifies the actual xml text, not
the path a file containing xml.

--
Hope this helps.

Dan Guzman
SQL Server MVP

--------
SQL FAQ links (courtesy Neil Pike):

http://www.ntfaq.com/Articles/Index...epartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--------

"no spam" <anonymous@.devdex.com> wrote in message
news:3fb4f782$0$198$75868355@.news.frii.net...
> Hi all,
> We are using a VB component to create and save an XML document on our
> local LAN.
> We want to load this straight into a DB Table using a query based on
> OPENXML. Trouble is, the sp_xml_preparedocument command always throws
an
> error.
> Here is some code:
> >>>> CODE >>>>
> DECLARE @.idoc int
> DECLARE @.doc varchar(1000)
> EXEC sp_xml_preparedocument @.idoc OUTPUT, @.doc
> <<<< END OF CODE <<<<
> where @.doc is the filename of our file on the LAN to be opened, and
> @.idoc is the handle to be created.
> the error is:
> XML parsing error: Invalid at the top level of the document.
> Here is some of the XML Document saved on the LAN that should be
opened
> by sp_xml_preparedocument and prepared.
> <?xml version="1.0" encoding="UTF-8" ?>
> <xdata created_by="OSA" created_at="Thu Nov 13 11:33:33 EST 2003">
> <rows row_count="1000">
> <row>
> <COL1>714761905</COL1>
> <COL2>714761905</COL2>
> <COL3>714761905</COL3>
> </row>
> </xdata>
> Any advice or tips whould be very helpful...
> thanks
> Phil
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

Sunday, February 19, 2012

help required

i have created registration form which consist of 6 webform, for each user i had given option save and come back later (say on webform3), when userlogin for the second time without complete registration i.e, on the 6th webform i had given save option then only it enters into database. the problem is when user login in for the second time he should be redirected to same page(webform3)

so i need help from urside

I beleive you are saving this information in database table. i don't now what table structure you are using in your application. but i think you are saving that information in user table then just create a web user control and place it on the top of the each page. that user control will check with database that on which page access last time and redirect the request by using response.redirect/server.transfer.

|||

This tutorial video (one of the many excellent tutorials available at www.asp.net) will demonstrate this for you.

http://asp.net/learn/videos/view.aspx?tabid=63&id=47