Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional 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 June 27th, 2007, 06:12 AM
Authorized User
 
Join Date: Sep 2006
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default write text file with fixed field length

Hi i would like to write a text file with fixed field length
12 is the fixed field length.

<%
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8

Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\Inetpub\wwwroot\Menu\Profa rin\hit_count2.txt", 8, True)


nome = "test"
cod = "43"
objFile.WriteLine("" & nome & " " & cod & " ")
objFile.close

SET objFile = NOTHING
SET objFSO = NOTHING

%>

file output should be:
 test 43 .
. the point is to tell that the text file end there (the point doesn´t appear in the text file)

Thank you






Similar Threads
Thread Thread Starter Forum Replies Last Post
Fixed Width text file to MSDE with C# mgudmund C# 2005 3 November 9th, 2007 05:09 AM
Import Fixed length - SQL SERVER 2000 carumuga SQL Server 2000 4 December 23rd, 2006 10:18 AM
Access 2000 Write Conflict on Text Field seananderson Access 4 December 19th, 2006 08:45 AM
Help me on Fixed Field Length data files hossrad SQL Server DTS 3 January 29th, 2005 07:50 PM
generating a fixed length export file cooky4 VB Databases Basics 3 October 27th, 2003 03:42 PM





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