Hi guys,
I have a stored procedure that I will subsequently post below this
message. What the stored procedure does is, it reads some specific
tables in a database and created XML off it.
The problem comes in when the data is bigger than a few hundred/
thousand characters. The data is truncated and the XML file is not
fully made.
Now i have been reading some posts by some people and tried using TEXT/
NTEXT/ IMAGE type to write the files but they give me errors which,
again, I am adding to this email.
STORED PROC:
*************** *************
CREATE PROCEDURE usrp_sp_makexml file
@str varchar(50),
@templatefile varchar(255),
@ReturnValue as image OUT
AS
SET NOCOUNT ON
DECLARE @strVar as varchar(8000)
/*DECLARE @ReturnValue as varchar(255)*/
Set @strVar = 'Select * from ' + @str + ' FOR XML AUTO'
Set @templatefile = 'c:\template.tp l'
EXEC (@strVar)
SELECT @ReturnValue
GO
THIS IS WHAT I GET WHEN I USE IMAGE/NTEXT/TEXT TYPE:
*************** *************** *************** ************
An unhandled exception of type 'System.Invalid OperationExcept ion'
occurred in system.data.dll
Additional information: Parameter 2: '@ReturnValue' of type: Byte[],
the property Size has an invalid size: 0
Also, if i try to add an integer value to the image/text/ntext like
8000 or something less than that, it tells me that the result has to be
discarded because the current process has had some error.
Can someone give me a suggestion on how to resolve this or an example
that would illustrate the solution? Thank you all in advance.
Pi. 3 1783
Hi
You may want to check out http://sqlxml.org/faqs.aspx?faq=29 but there may
be issues with line breaks for sp_makewebtask or look at http://www.perfectxml.com/Articles/XML/ExportSQLXML.asp
John
"Pi" <3.*********@gm ail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. . Hi guys,
I have a stored procedure that I will subsequently post below this message. What the stored procedure does is, it reads some specific tables in a database and created XML off it.
The problem comes in when the data is bigger than a few hundred/ thousand characters. The data is truncated and the XML file is not fully made.
Now i have been reading some posts by some people and tried using TEXT/ NTEXT/ IMAGE type to write the files but they give me errors which, again, I am adding to this email.
STORED PROC: *************** *************
CREATE PROCEDURE usrp_sp_makexml file @str varchar(50), @templatefile varchar(255), @ReturnValue as image OUT
AS SET NOCOUNT ON DECLARE @strVar as varchar(8000) /*DECLARE @ReturnValue as varchar(255)*/
Set @strVar = 'Select * from ' + @str + ' FOR XML AUTO' Set @templatefile = 'c:\template.tp l'
EXEC (@strVar)
SELECT @ReturnValue GO
THIS IS WHAT I GET WHEN I USE IMAGE/NTEXT/TEXT TYPE: *************** *************** *************** ************
An unhandled exception of type 'System.Invalid OperationExcept ion' occurred in system.data.dll
Additional information: Parameter 2: '@ReturnValue' of type: Byte[], the property Size has an invalid size: 0
Also, if i try to add an integer value to the image/text/ntext like 8000 or something less than that, it tells me that the result has to be discarded because the current process has had some error.
Can someone give me a suggestion on how to resolve this or an example that would illustrate the solution? Thank you all in advance.
Pi.
According to the Sybase ASE manual at :
<http://sybooks.sybase. com/onlinebooks/group-as/asg1250e/refman/@Generic__BookT extView/4429;pt=4429#X>
<snip>
Restrictions on text and image columns
text and image columns cannot be used:
*As parameters to stored procedures or as values passed to
these parameters
*As local variables
</snip>
Hi
With Microsoft SQL Server text is a valid datatype for parameter.
John
"ZeldorBlat " <ze********@gma il.com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. . According to the Sybase ASE manual at :
<http://sybooks.sybase. com/onlinebooks/group-as/asg1250e/refman/@Generic__BookT extView/4429;pt=4429#X>
<snip> Restrictions on text and image columns text and image columns cannot be used: *As parameters to stored procedures or as values passed to these parameters *As local variables </snip> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Hal Vaughan |
last post by:
I am using OpenOffice files in my app. They're stored in .zip format, so
the zip format is much more important, in this case, than that they're OOo
files (other than that the extension is .sxw and not .zip).
(I know these code sections use outside variables, but it's probably pretty
clear what the outside variables are -- if not, I can clarify.)
I read the files in this way:
int i = 0;
byte bIn = new byte, bData;
|
by: Adam B |
last post by:
Hello. I'm writing an aspx page that reads a file from
disk and writes the file out through the
Response.WriteBinary() method. This allows me to support
security and custom reports for various users. I am
adding the MIME type for the type of file that I am
writing out to the response. Example:
if ( reportName.ToLower().EndsWith(".pdf"))
{
|
by: Bob Hansen |
last post by:
I am having a very strange problem with StreamWriter and writing to files.
I have a procedure that is called several times to write out seperate files,
each of them uniquely named by date all they way to the one hundred
thousandth of a second. After the data is encrypted and written, the
StreamWriter is closed and the function is returned. This all works fine
and dandy, except when it is called more than once in succession.
Originally,...
|
by: Xah Lee |
last post by:
Python Doc Problem Example: gzip
Xah Lee, 20050831
Today i need to use Python to compress/decompress gzip files. Since
i've read the official Python tutorial 8 months ago, have spent 30
minutes with Python 3 times a week since, have 14 years of computing
experience, 8 years in mathematical computing and 4 years in unix admin
and perl, i have quickly found the official doc:
http://python.org/doc/2.4.1/lib/module-gzip.html
|
by: Abhishek |
last post by:
I have a problem transfering files using sockets from pocket pc(.net compact
c#) to desktop(not using .net just mfc and sockets 2 API). The socket
communication is not a issue and I am able to transfer data across.On the
serve I am using Socket 2 API (recv function to read bytes)and not using
..NET. I use FileStream to open the file on the pocket pc, then associate a
BinaryReader object with the stream and call ReadBytes to read all the...
| |
by: John R. Delaney |
last post by:
I am running in debugging mode after a clean C++ compilation under .NET 2003. In a BIG loop (controlled many levels up in the call stack), I open a file with fopen using the "a" option. Then I write 23 doubles to it with fwrite, one call for each double. Then I close the file using fclose. After three times around the loop in the debugger, I stop the program (using "Stop debugging"). That is writing 552 bytes.
The resulting file's properties...
|
by: Lokkju |
last post by:
I am pretty much lost here - I am trying to create a managed c++
wrapper for this dll, so that I can use it from c#/vb.net, however, it
does not conform to any standard style of coding I have seen. It is
almost like it is trying to implement it's own COM interfaces...
below is the header, and a link to the dll+code:
Zip file with header, example, and DLL:...
|
by: arne.muller |
last post by:
Hello,
I've come across some problems reading strucutres from binary files.
Basically I've some strutures
typedef struct {
int i;
double x;
int n;
double *mz;
|
by: Neil Crighton |
last post by:
I'm using the zipfile library to read a zip file in Windows, and it
seems to be adding too many newlines to extracted files. I've found
that for extracted text-encoded files, removing all instances of '\r'
in the extracted file seems to fix the problem, but I can't find an
easy solution for binary files.
The code I'm using is something like:
from zipfile import Zipfile
z = Zipfile(open('zippedfile.zip'))
|
by: as001 |
last post by:
Hi,
I'm writing a windows application in C# using VS 2003.
I got stuck where it has to write multiple output text files. Here's my piece of code:
for loop
{
Random r = new Random();
//use millisecond and random to avoid similar filename
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
| |
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |