472,995 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,995 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 3691
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.