473,386 Members | 1,775 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,386 software developers and data experts.

filesys.createTextFile limit

I use filesys.createTextFile to create a csv file. If I have about 600
rows(10 columns) then I can see the csv file created. But, if I have
about 700 rows(10 columns still) then the csv file not created. I
repeated many times and the result is the same.

Is there a limitation on filesys.createTextFile?

Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
3 3703
show your code

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"eddie wang" <ew***@kmg.com> wrote in message
news:uC**************@TK2MSFTNGP10.phx.gbl...
I use filesys.createTextFile to create a csv file. If I have about 600
rows(10 columns) then I can see the csv file created. But, if I have
about 700 rows(10 columns still) then the csv file not created. I
repeated many times and the result is the same.

Is there a limitation on filesys.createTextFile?

Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #2
Here is the code. The csv file is not created when the data is too
much.
<!-- #include file="includes/connectionestimator.asp" -->
<% 'Generating excel filename
dayval = datepart("d",now())
mnthval = datepart("M",now())
yrval = datepart("yyyy",now())
hrval = datepart("h",now())
minval = minute(now())
secval = datepart("s",now())

filenameval = dayval & mnthval & yrval & hrval & minval &
secval

sqlStr = Request.QueryString("sqlStr")

Set rs = conn(sqlStr)

set filesys = createObject("Scripting.FileSystemObject")
set texts = filesys.createTextFile(application("ApplicationPat h") &
"repository\repository_" & filenameval & ".csv",true)

for each item in rs.fields
texts.Write item.Name & ","
next
texts.WriteLine ""

while not rs.EOF
for each item in rs.fields
if item.Value <> "" then
texts.Write replace(item.Value,","," ") & ","
else
texts.Write item.Value & ","
end if
next
texts.WriteLine ""
rs.MoveNext
wend

%>

<table width="100%">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td align="center">Please click <a
href="repository/repository_<%=filenameval%>.csv">here</a> to view your
Excel file.</td>
</tr>
</table>

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3
How big is the successful file (with 600 rows)? I've never heard of this
kind of limitation, and imagine something else is going on.

For performance reasons, you might consider using getRows() or getString()
instead of looping through, once you get the write issue sorted out.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"eddie wang" <ew***@kmg.com> wrote in message
news:eF**************@TK2MSFTNGP12.phx.gbl...
Here is the code. The csv file is not created when the data is too
much.
<!-- #include file="includes/connectionestimator.asp" -->
<% 'Generating excel filename
dayval = datepart("d",now())
mnthval = datepart("M",now())
yrval = datepart("yyyy",now())
hrval = datepart("h",now())
minval = minute(now())
secval = datepart("s",now())

filenameval = dayval & mnthval & yrval & hrval & minval &
secval

sqlStr = Request.QueryString("sqlStr")

Set rs = conn(sqlStr)

set filesys = createObject("Scripting.FileSystemObject")
set texts = filesys.createTextFile(application("ApplicationPat h") &
"repository\repository_" & filenameval & ".csv",true)

for each item in rs.fields
texts.Write item.Name & ","
next
texts.WriteLine ""

while not rs.EOF
for each item in rs.fields
if item.Value <> "" then
texts.Write replace(item.Value,","," ") & ","
else
texts.Write item.Value & ","
end if
next
texts.WriteLine ""
rs.MoveNext
wend

%>

<table width="100%">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td align="center">Please click <a
href="repository/repository_<%=filenameval%>.csv">here</a> to view your
Excel file.</td>
</tr>
</table>

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Fabio | last post by:
Hello, I'm trying to put the file into the Windows NT server using the Perl script but it doesn't work. Just look at the following script: use Filesys::SmbClientParser; my $fl =...
0
by: eddie wang | last post by:
Excel open automatically without giving a dialog box option to Open/Save/Cancel using filesys.createTextFile. How to pop up the dialog box option to Open/Save/Cancel? Thanks.
1
by: Anchorman | last post by:
A few days ago, I upgraded my browser to the very latest version, and updated to the latest service pack on my Windows 2000 machine. Since that time, as I'm testing my ASP applications on my...
2
by: Laphan | last post by:
Hi All I know how to do GetRows paging and the like with a recordset, but does anybody know how to do paging with the FileSys object? Basically I use the FileSys object to list the pics that I...
14
by: Séverine Donnay | last post by:
Hi, I develop a website on my local computer in ASP/SQL SERVER 2000 in XP PRO OS. The CreateTextFile, DeleteFile and OpenTextFile (for appending and also just for reading) functions doesn't...
2
by: NeilS | last post by:
I'm developing under IIS V5.1 and testing on an ethernet with IIS hosted on WinXPPro. I am trying to implement file-upload using a polished version of the technique published in...
1
by: Iain Bishop | last post by:
I am trying to execute the following function which performs four tests to make sure the current environment is capable of uploading files. Test 1 completes ok, but test 2 results in the page...
8
by: vasu1308 | last post by:
Hi I want to monitor disk space and send a email if it exceeds the limit. I m using "use Filesys:: Diskspace" but there is an error in compling. "Can't locate Filesys/Diskspace.pm in @INC...
1
by: satyakm79 | last post by:
Hi I'm using perl 5.8.3 for MsWin32 and I have problems installing Filesys::DfPortable module. Here is the error that I get: cl -c -nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
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,...

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.