Textstream Objects
What I'm trying to do is take a really long text file and just pull out key lines in the file based on the first word on the line to create a new text file with just the lines I select for written.
I'm comfortable with the opening and creating textfile part, but how would I scan through the source file and only readline when I hit line that starts with a keyword, then append that to the new file and keep going until the next keyword or file end? That's what I can't figure out.
View Replies
ADVERTISEMENT
I have an asp page which opens a large (190 lines) text file. I hold the text file open and retrieve the lines, one at a time until there is no more lines to retrieve. The trouble is that I keep getting the error message
Microsoft VBScript runtime (0x800A003E)
Input past end of file
I understand that there is more lines in my code than there is in the textstream, but I have tried to use several functions to stop the code from reading further. Including do while f.AtEndofStream = false and while not f.AtEndofStream = true. I have also tried to count the lines in the file before reading each line. Nothing has solved this error.
I understand that in some text files the AtEndofStream can be influenced by CRLF's after the data, but can anyone shed some light on this?
View Replies
View Related
I have so far been unable to get the TextStream Object to write on Fat32.
I'm using Windows 2000 Pro Sp4. Scripts have write access and I even tried
giving IUSR user level writes and still when I tried loading the ASP page it
just hangs trying to create the file :(.
<%
Function WriteText(sPath, sText)
Dim fso, TextFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set TextFile = fso.CreateTextFile(sPath, True)
TextFile.Write sText
TextFile.Close
End Function
WriteText "Test.htm", "Testing, Testing, 1, 2, 3"
%>
View Replies
View Related
how can I go back to the first line of my file, once that I've used the ReadAll propriety?
View Replies
View Related
In Windows 2000 I need permissions set so that I can write a text file to the folder when the asp page is loaded. Right now I have only these permissions set:
Administrator: Full
System: Full
Everyone: Read and Execute, List, Read
Network: Read and Execute. List. Read
Is there some other "user" that I can give permissions to to write a text file to the folder that doesn't allow write permissions to IUSER_MachineName?
View Replies
View Related
I was working with filesystemobject in asp.
When i give filesysstemobject.copyfile the system will be gogin searching indefelty and IIS will get crash..
Why this pblm occurs..
View Replies
View Related
I would like to know if someone has already exchange ASP objects by SOAP with the SOAP Toolkit 3.0 ? Is-it possible ?Because, I have to connect, with ASP, to a Web Service and send to him array of objects.
View Replies
View Related
I'm so glad i finally found a web development forum! It's been a while and it's not easy to find. Until someone recommended this site to me.
Enough about that... I really want to learn about COM objects and don't really know where to go to find out about such things.
If someone could direct me to the right place, i'd be extremely grateful.
I've already learned ASP and PHP (though i have to admit that i am not an expert and I don't think i'll ever be one), but i aim to be a "jack of all trades".
View Replies
View Related
anyone have better information on IIS 5.0 memory behaviour on setting objects to nothing?
Connections and recordsets of course should be set to nothing, but should for example XMLNode object be set to nothing?
View Replies
View Related
I have a object which I declare as a application object "gObj".
I need to use "gObj" with all sessions. I need "gObj" to have access based on the user's id. Is this possible without creating multiple gObj's?
Code would be something like:
Application_OnStart
set gobj = Server.Create( "someDll" )
gobj.uname = "somename"
gobj.port = 1234
gobj.pwd = "pwd"
View Replies
View Related
I've created a simple pop-up form that
takes the required info and sends it via e-mail. Right now, I've got
the From E-mail, the To E-mail, the Subject, and the TextBody. It
works, and it's fine, but I'd like to spruce it up a little so I can
make it more personalized. Can I add other objects? I've been
searching for a general reference online that lists all my choices for
ObjCDO, but can't find anything, and any ideas of my own ("FirstName",
"Comments", etc.) have been shot down as not being supported.
View Replies
View Related
I have stored a .gif and jpeg file in the database as the BLOB object.
Now I am trying to create a report which displays that gif file along with another information.
Is there a way I can display the BLOB objects on the page without having to use any crystal report tool or anything ?
View Replies
View Related
I build a ATL object that is used in an ASP page.
Can I insert events inside this ATL object?
ATL is builded in C++
View Replies
View Related
I have a website with a large collection of pages. Many of these dynamic pages use multiple objects created via the Server.CreateObject method. There are filesystem objects, recordsets, browsertype objects, you name it. I need a script that will loop through all of the objects and Set them = Nothing to destroy them.
I imagine the script would be somewhat like this.
For Each obj In ServerObjects
If IsObject(obj) Then
Set obj = Nothing
End If
Next
View Replies
View Related
I created a label, a textbox and a button when i build the webform and try to see it with the explorer it only show the label
The other 2 objects (textbox and Button) at the Visual Basic.Net editor at the properties are visible and in the code i have
<asp:TextBox id="TextBox1" runat="server" Width="122px"></asp:TextBox>
What can I do that
View Replies
View Related
I've read that you shouldn't store objects in Session variables.
I've read these reasons:
- The object takes up memory that may not be freed until the session times
out. Better to create the object only when you actually use it.
- Causes poor performance because the thread that created the object has to
service all requests for it.
Assuming I can live with the memory and performance implications (a big if,
but let's assume it for a minute), what other reasons are there?
View Replies
View Related
1) can any one tell me what are built in objects in ASP 3.
in asp 2 it was
request
response
session
application
server
object context object
2)what are asp variables ?
View Replies
View Related
I have a problem with including an object in my asp page. I�ve translated an algoritm I found that was written in javascript and it needs a method, floor(), from System.Math to work.
in javascript you can just write Math.floor(x+1) but it seems asp doesn�t automatically include that Math object. It�s a little weird since the method Round() can be used withour any includes of any kind and thats a part of the Math object!
So... How do I do to access this floor() method?
I tried to write:
<%Imports System.Math %>
but it doesn�t seem to do the trick.
View Replies
View Related
Can i get any asp sample codes to retreive photo's from access database
For instances:To get codes on your pages Response.write......
similiar for images.
View Replies
View Related
Set obj = Server.CreateObject("")
can the above statement be used to create any objects other than a recordset?
View Replies
View Related
I have scripts on a server that awhile back had new option/server packs installed (to accomodate security and net framework issues) and my classic asp date references
"Date()" and "Now" will sometimes flip flop the formatting of the date from 10/3/2003 to 3/10/2003 (european mode).
What would be a good way to use an include file to perhaps an asp.net date object, or where would I find a good reference to using an aspx file to calculate and display the date properly so that I can avoid this flip flop snafu of the date formatting.
View Replies
View Related
ISessionObject is created each time When any ASP Page is started executing and destroys on the page ends (not session end) while the session state (data) is originated already somewhere from where ISessionObject fetches.
When user Request another page the ISessionObject is again constructed and the data from original location is loaded from there.Same with IApplication type object & IScriptingContext object.
View Replies
View Related
I've a client-server application written in Access. Some of the codings make use of OLE so that the Access application creates a Word document on the fly and fit in relevant values.I'm examining if using ASP pages can do similar function (to create and manipulate OLE objects)?Anybody knows if ASP can do?
View Replies
View Related
I want to have a little box on my asp login panel. I want to be able to display the following
Number of databases
Number of tables
Number of users (logins)
Time/Date of last update
Last user logged in
How can I go about doing this? What code do I need?
View Replies
View Related
I'm creating a small program in Dreamweaver. The first screen is a login screen that contains a form, which asks for the users Email address and a password. The form is called 'login' which contains 2 fields, email: (called 'login') and password: (called 'password').
Anyway, to cut a long story short, I've managed to do all the authorisation stuff. A back-end database which contains a table called 'users' has all authorised emails and passwords. So when a user logs in, the login criteria is checked against the email/password in the Microsoft SQL database table, if it matches, they are redirected to the user account page.
At the top of the user account page I want it to say "Welcome! <Insert user email address here>" I know it may have something to do with session objects which are passed on but I have no idea how to program it.
View Replies
View Related
I am calling a variable from flash to my ASPpage. the variable is a string. I do all the variable substitution in flash so all that is outputted to ASP is the string to a file on the server.
All variables pass (according to flash) but the ASP page just hangs. Code:
View Replies
View Related
I have a website with a large collection of pages. Many of these dynamic pages use multiple objects created via the Server.CreateObject method. There are filesystem objects, recordsets, browsertype objects, you name it. I need a script that will loop through all of the objects and Set them = Nothing to destroy them. I imagine the script would be somewhat like this.
For Each obj In ServerObjects
If IsObject(obj) Then
Set obj = Nothing
End If
Next .
View Replies
View Related
I need to dynamically include documents stored in my own website. The website is coded in ASP. As far as I know there are two common options: File Sytem Object versus and the MSXML Objects. Which one of the two would be less of a resource hog for IIS ?
the documetns I want to include are stored in the server where the website resides, not on another webserver. Otherwise I'd have no choice but to use msxml.
View Replies
View Related
I am on page page1.asp and I have a reference to an ASP Vbscript object. I need to use Server.Execute("page2.asp") and want to pass a reference to this object using a session variable. Code:
View Replies
View Related
I have a password system on my site using session("login") = "" to assign a username that sticks with them once their password, etc. has been verified.
This session object then disappears as soon as they change page, I think because the lengthy free host's url is masked by a swish paid for one.
IE displays a privacy report icon at this point, presumably objecting to the fact that a cookie is being placed from a site who's url is not in the address bar.
View Replies
View Related
I need to ba able to update records of my database via a user-input form. I have some scripts that uses the Persits objects, such as PersitsUpload.1, that allows to do that.
But, since I am hosting my programs somether that the server does not have persits objects my program fails. What is the equivalent PersitsUpload.1 objects in ASP which allow upload, edit/delete/create new records from user inout via form? Or is there a better way to do this?
View Replies
View Related
Can I add two request objects?
View Replies
View Related
How do you call ActiveX objects written in C# (.NET iow) from ASP not ASP.NET? Windows CE's webserver does not support ASP.NET only regular ASP.
View Replies
View Related