Text Files Queries

i have a text file (tsv) with products in, but i want to run queries on certain fields, e.g. description, i ahve tried linking the txt file to a databse but the recordset does not work,

does anybody have a sample script that will query a tsv, csv file.. e.g.

SELECT FROM prices.tsv

WHERE products = cisco

View Replies


ADVERTISEMENT

Select Queries With Just A Text Link

I have 2 queries on one asp page, usually I only run query 1 as default, But I hope there is a text link called "Run query 2" and when I click it, my asp file will run query 2.

View Replies View Related

International Text And FSO Created Text Files

When using ASP's FileSystemObject to create text files, I am unable to get user submitted text (in Hebrew) to save as anything other than "?????". The text file is being saved in Unicode and setting the CodePage in ASP proved unsuccessful. Strangely, hard coded Hebrew text in an ASP variable does add to the text file correctly.

Any ideas of why this happens and how to get it to work correctly?

View Replies View Related

Text Files

I have an ASP (not ASP .NET) application that I have to modify. I am now using Visual studio .net as the editor. I would like to be able to work on the files together with a colleague and have versioning included in the ASP text files each time they are modified.

In addition, any comments that I make about the files as a whole in the editor should be automatically inserted in the ASP file as comments. Anyone knows an editor that can help me with this?

View Replies View Related

Securing Text Files

I haven't started programming with databases yet, but instead have been saving data in asp files. The files would look something like this.... Code:

View Replies View Related

Writing Into Text Files

I'm writing a script lately to write some records into a text file for backup purpose. But may i know do asp allow update for the text file? Cause i dun want it to overwrite my previous records.

View Replies View Related

Searching Text Files

I have developed a search engine to search through an Access database.It uses three fields to say if the number of people is less than 300 then display these fields.

I have searched for an engine to do the same thing using a text file as oppossed to Access.I have only found examples saying you can search through text files to find character similar to the search term.Does anyone know if it is possible to pull a character form a text file and use ASP to say if its less or more than.

View Replies View Related

Read Text Files

I want to read textfiles with ASP. But I want to do this in a special way.

I want to set a variable, for each line.

So for example:
Dim line1, line2, line3, line4, line5
line1 = Line 1 of the text file
line2 = Line 2 of the text file
line3 = Line 3 of the text file
line4 = Line 4 of the text file
line5 = Line 5 of the text file

How do I have to do this? .....

View Replies View Related

Compare 2 Text Files

I want to be able to compare 2 text files and display the diffeneces.on a webpage.

View Replies View Related

Reading Text Files

I was under the impression if I had a page with several database queries to 3 different databases, it would be faster if I just had the queries cached to text files since the query result won't change that often and I build the cache manually when needed.

So my question is would it be faster to just include text files instead of doing multiple Access and SQL queries on a web page?

View Replies View Related

Upload Text Files In IIS

i want to upload text files present on my comp (running IIS) to a ftp site which is password protected (I have the "write" access to the site) how do i go about doing it?

View Replies View Related

FileSystemObject To Read Text Files

Can I use FileSystemObjects to Read Text Files on my server rather than just on my local drive?

View Replies View Related

Using Filesystemobject To Combine Text Files?

I have several text files on my server and I would like to combine them into one text file by just appending each file to the end of the combo file. I know this should be possible, I just don't know how to approach it. Some combination of OpenTextFile and CreateTextFile?

View Replies View Related

MSXML2.ServerXMLHTTP Works Only With Text Files?

I'm trying to remotely get a pdf file - http://remoteServer/file.pdf - in order to store it into another server, maybe with Scripting.FileSystemObject

However the following code doesn't work properly:

------------
url = "http://remoteServer/file.pdf"
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send ""
------------

as xmlhttp.responseText does not contain the whole file textStream, but only a part of it.

View Replies View Related

Write Text Files To Local Machine

I need to know how to write a text file to a local machine. Here is my code:

Set myFSO = Server.CreateObject("Scripting.FileSystemObject")

Set WriteText = MyDrive.CreateTextFile("C: est.txt", True, False)

Right now it writes the file to the C: drive on the server.

View Replies View Related

Creating Fixed Width Text Files

i know how to create text files using ASP, but is there any way to create fixed width text file using ASP? i need to have the data lined up in the same location at each row.

View Replies View Related

The Server.CreateObject Method For Creating Text Files

I have made a asp page that will read a db table and select certain fields concerning the current day's activities to be written to a text file. After the information about the current day's activities has been compiled, it is stored in a variable and written to a text file.

What I would like to do is create a text file for each day instead of over-writing the same one. Is there another Server.CreateObject method that will allow the 'creation' of a text file rather than just over-writing a text file that already exists? I would use "month(date)", "day(date)","year(date)" to append to a text file name to keep it unique.

Below is what I currently use to create a text file. But any new information will only overwrite what is already contained in the text file. Code:

View Replies View Related

Incorporating Contents Of Text Files Onto A Html Page

im wondering if there is a method/command which can be used so that when an asp page is called, it can 'explode' content from a text file (.txt) onto a web page, thus enabling a n00b to alter the text within the file, rather than the web page itself?

Further more, if I wanted to incorporate the text which is exploded into a CSS to give it some style flava, how would I do this? Is it possible?

View Replies View Related

Queries

Normally I use Access database with ASP, and I create queries using the wizard which Access has. Then, I copy and paste the code in the ASP page and create my SQL.

I was wondering if it is easier to call the query directly with its name from Access, or else continue using the old procedure.

View Replies View Related

SQL Queries

I'm trying to build sql queries that will search through my DB. I am currently seperating my queries through multiple indexes in an array depending on whether or not the strings are wrapped in quotations.

I also want
Fluffy
Teddy
Bear
(three different LIKE statements)

View Replies View Related

3 Queries Or 1

I have the following page which I am using to select 3 diffrent queries but i was wondering if i could just use one SQL statement instead of 3? Code:

View Replies View Related

On The Fly Queries?

Say I have 5 fields in a form. I have figured out how to query a database using all 5 fields and display the records that match at least one of the fields.

I'm trying to figure out a way to, if say the user only fills in two fields, to only search the database for matching records based on just the two fields. As I have it now, the database is searched for the two fields they entered as well as three fields of "", which I would rather not have. Is this possible?

View Replies View Related

Sum() In SQL-queries

I have a DB. With 1 table called "products" and 3 product records. The 2 fields present in the table are called product_name and product_price. The names of the products are Product1, Product2 and Product3. They cost 13, 8 and 24. Which code (SQL and AP) would generate an output similar to this?

Total is: 45.

Product1 costs 13
Product2 costs 8
Product3 costs 24.

<%
SQL = "Select * FROM products" (plus some kind of sum function to calculate the total (to be able to display the sum before the various products) of the recordset without having to loop through the recordset first)
%>

View Replies View Related

Multiple Queries

I need to connect to 2 different databases in ASP and execute two different queries. Please let me know how to proceed. I understand that ADODB.Command option can connect to only one database at a time.

View Replies View Related

Stored Queries

I am running the following code to an access database

' Recordset Object
Dim rs

' connecting to database
con.Open connStr

' executing stored procedure
Set rs = con.Execute ("exec SpotDesc")

' showing all records
While Not rs.EOF
Response.Write rs(0) & " " & rs(1) & "<br>"
rs.MoveNext

Wend

' closing connection and freeing resources
con.Close

Set rs = Nothing



This works and runs the stored procedure SpotDesc.

One question I have is that this line brings back the results

Response.Write rs(0) & " " & rs(1) & "<br>"

but requires me to know how many colums are being returned, ie rs(0) is column 1 and rs(1) is column 2

Is there a way of writing this line and it places all the columns there wheter it be 1, 2, or 3?

Ie a way of know how many columns are returned...

Is there also a way to show the column heading?

View Replies View Related

Can ASP Use Access Queries?

I never ever thought about this, but recently I made a query in access so I
can make a customer mailing list based on relational information and it was
so easy to make the query and join tables and assign criterea using access.
And I haven't tried or thought about this cause in my own small asp projects
I've never used a dbase with queries in it, but after seeing how easy it
was, it would save a lot of time from manually writting queries in asp.

So, what I'm asking is if I can use a query from an mdb in asp just like I
can access tables?

View Replies View Related

Sql Problem With Sub Queries

This "query2" is used in an MS Access environment.

SELECT T_Perso.*, query1.*
FROM T_Perso LEFT JOIN query1 ON T_Perso.IdPerso = query1.IdPerso;

In SQL, "query1" is :

SELECT T_Items.*, T_Items.IdTypeItem
FROM T_Items
WHERE (((T_Items.IdTypeItem)="Inscription"));

I would like to translate "query2" in full SQL language in order to use it
in ASP but I have some problems with syntax and sub-queries.

I suppose it's quite easy but.I'm a newbie in SQL.

View Replies View Related

2 Queries And Then Compare Them?

Can I have one recordset execute a Select and then have another recordset execute a different Select, and then check if a field from the first recordset is different from the field in the 2nd recordset and if so write out that row on my displaying table?

View Replies View Related

Dynamic SQL Queries

I want to define search based on diffrent conditions.The user has the option to select any number of choices.i.e

Condition1.Age
Condituon2.Age & marks
Cindition3.Marks

How do I construct dynamis sql query?

View Replies View Related

Passing Queries

I am using ASP and crystal reports 8.5. I am able to show report from asp. My problem is , I have to show the report based on the sql query that is passed to crystal report from asp. I actually dont know how to pass a query into crystal reports from asp.

View Replies View Related

Two Separate Queries

I have a single asp page (index.asp) with an include file (include.asp). I would like to query the database with index.asp as well as query it with include.asp.

I searched online, in my "SAMS Teach yourself active server pages 3.0 in 21 days" and it makes no mention of two queries on a single page. Is this even possible?

View Replies View Related

Many Queries From An If Statement

Is it possible to use an If statement to select a single query from a list of queries from an access db? Something like this:

If Request.Form("Womens") = "Pants" Then
'open the db and run the query called pants
ElseIf Request.Form("Womens") = "Shirts" Then
'open the db and run the query called shirts
'on and on we go, etc.
End if

My gender categories (women, men, etc.) have multiple sub categories (shirts, shoes, skirts, etc.). Does is make sense to use an if statement(assuming it can be done) in this manner? It seems it would make life easier to use one script to perform many tasks, as opposed to one script that does just one task.

View Replies View Related

2 Simple Queries Into One

the following statement doesn't work, even thoug when I execute SQL_1 and SQL_2 separetlly it works fine.


SQL_1 = "SELECT COUNT(*) AS ACTIVE_LINKS FROM TABLE_LINK WHERE ACTIVE = 1"
SQL_2 = "SELECT COUNT(*) AS UN_LINKS FROM TABLE_LINK WHERE ACTIVE = 0"
SQL = SQL_1 & " UNION " & SQL_2 ...

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved