Tab Delimited Files
can anyone put me on the right track.i have a comma delimited file and i need to search through this file and locate where acctsessionid does not have 2 matching records and display them on an asp page.
View Repliescan anyone put me on the right track.i have a comma delimited file and i need to search through this file and locate where acctsessionid does not have 2 matching records and display them on an asp page.
View RepliesWhenever I import a comma delimited file the field lengths are always 255. I tried an import specification in my code but they were stll 255 in length.
I imported about 156 fields and about 140 came in at 255. Not gonna work.
need to query a database and then get the results in a tab delimited file.currently am writing record by record in the file using the FSO,but just wanted to check can we directly get the results in the TAB delimited format and save to a file on the server.
I need to be able to read a tab delimited text file with an asp page so that I can stuff the fields into a sql table.I really don't know how you can do that, I checked the books I have and have been running around the internet trying to find the answer when I found this site.I cannot use a bulk insert statement because I don't have that level of access to the sql server. and I was assured that "BCP is indeed a command-line only utility and cannot be launched from ASP. You could parse the text file with ASP and generate INSERT statements that you then execute against the database. Routines for parsing tab-delimited files can be had by searching for them on google quite easily." by the system administrator
View Replies View RelatedI have the below code found on an ASP site.
<%
arrName = Split(Request("TextArea"),",")
%>
<%
For i = LBound(arrName) To UBound(arrName)
Response.Write "ID: " & arrName(i) & "<br>"
Next
%>
I'm using a TextArea box to submit the following...
A123,1
B123,2
C123,3
Results are...
ID: A123
ID: 1 B123
ID: 2 C123
ID: 3
I expected something like...
A123 1
B123 2
C123 3
For the sake of understanding, why are the results like above?
In the end, I want to insert these values into a table.
A123 into Field1 .... 1 into Field2
B123 into Field1 .... 2 into Field2
C123 into Field1 .... 3 into Field2
Where do I start?
What's the easiest way to generate CSV or a comma delimited file from an ASP
recordset? I've seen a few searching the internet and they appear to be
overkill or out of date.
i am trying to run a asp sql query containging many tables. the main table though is a simple ID based table contains all ids from the other tables. Code:
View Replies View RelatedHow can I populate the results of a recordset into a comma delimited?
The recordset is only returning a sequence of ID's (one column - one dimension). I was trying the getRows and getString method. If the result was only one record it was okay, but for more than one result I was getting an unhandled data type error.
I would just like to place the values from the recordset into a comma-delimited list and then pass that into a javascript function?
Due to using a combo of OLEDB/ADO/ASP and JavaScript I was having trouble
reading in CSV data so I converted my client's web site to use tab-delimited
instead. Better for me, but client is adamant that their site's recent
timeout problems are since I converted to this tab format?? Code:
I'm trying to read a tab-delimited file into an array so I can pick out different fields for a report. I keep getting a "Type Mismatch" error that I don't understand.
sReceiveFile = "receipt.txt"
sDataFile = sReceiveFolder & sReceiveFile
sDelimiter = "Chr(9)"
Dim objFileSystem, objFile
Set objFileSystem= CreateObject("Scripting.FileSystemObject")
Set objFile = objFileSystem.OpenTextFile(sDataFile,1)
sReadLine = objFile.readline
Do While objFile.AtEndOfStream <> True
Response.Write "<UL>" & Chr(10)
'Response.Write objFile.ReadLine & "<br>"
sSplit = split(objFile.Readline,"Chr(9)")
Response.write sSplit ' I want to see the contents and this line is giving me the error
Response.Write "</UL>" & Chr(10)
Loop
objFile.Close
%>
I need to read a tab delimted file into an array with ASP. Should be
easy enough, I know it is in Perl and PHP. Can someone show me how
that's done or post a link to an example.
This is what I'm trying to do in perl:
#!/usr/bin/perl -w
my $file = "myfile.txt";
open(FILE, $file);
while(<FILE>){
my ($f1, $f2, $f3) = split(' ', $_); # or @array = split(' ', $_)
print "F1:$f1 F2:$f2 F3:$f3
";
}
close(FILE);
I have written an ASP script that collects information from a form. The info is stored in one variable name. When I request the info, it is returned as a comma delimited string. How can I manipulate this string so the data can be stored in a database? I appreciate your assistance.
View Replies View RelatedAnyone know the best way of Read tab delimited text file, its old but I have to use it, I only know how to read csv.
View Replies View RelatedI've been asked to develop a semi-automated type situation where we have a
database table (sql server) and periodically, there will be a comma
delimited file from which we need to import the data, replacing the old.
I naurally know that we can use [truncate tablename] to kill the other data,
but does anyone have any examples of importing a comma delimited file into
SQL Server with ASP?
I need to create a 2 dimensional array from a string with 2 kinds of delimiters
sample string: Code:
In an application I'm working the user has the opportunity to record the
despatching of one or more items with serial numbers.
For each item they despatch, they have to chose the serial no that they want
to despatch from a list of available ones. In many cases, these items will
be of the same time, so the dropdown of available serial no's may be the
same. Code:
Is it possible to have a search page that queries a sql database and then writes the results to a comma-delimited text file instead of displaying the results.
I have no problem creating the search page and displaying the results I just don't know how to create the comma-delimited text file from the recordset results.
I have a sql server 2000 table with a comma delimited list of ids. there is a seperate lookup table with a desc for each id.
I need for this data to be retuned in the same order in which the data was entered into the database. right now it is returning ordered by the id from the lutable.
how to create a comma delimited text file from an asp form. Assume my fields are: Name, email, phone number.
View Replies View RelatedI want to use a simple CDONT mail script to allow the administrator of a site to send an email blast to their users. there are approx 1600 emails in the MS SQL db table. I would like to parse the entire email address column and get a variable that is all the email addresses separated by a comma so that the form picks it up as all the emails in the 'bcc' field as in the eg. below..I know there has to be an easier way but I want to get these guys up and running.
<%
objCDO.To = "Recipient@oursite.org"
objCDO.From = "mailer@oursite.org"
objCDO.bcc = "$variable_of_all_email_addresses"
Dim txtSubject
txtSubject = "Insert comments and case info here"
objCDO.Subject = ""***ATTENTION*** NEW CASE - MISSING CHILD"
objCDO.Body = txtSubject
objCDO.Send
%>
I would like to use ASP to populate a select list from a comma delimited txt file.....
View Replies View RelatedI have a website that we display images we have saved into a SQL Server 2000 database as binary BLOB. This is on a Windows 2003 Server. Just recently (a week ago) this website began to save the images it is displaying on the website as ASP pages in the Temporary Internet Files > IE.Content > Folder.
We have other websites where we use the exact same code and these do not save files on the server when they are displayed.
Here is the code to display the image:
Set rs = objConn.Execute( SQL )
Response.ContentType = "application/octet-stream"
Response.BinaryWrite rs("Product_Image")
SQL is the SQL String to get the image from database
When I add this code:
Response.ContentType = "image/jpeg"
The images still display on the website, but now are saved in the Temporary Internet Files folder as JPG's.
Can a php file be executed inside an asp file? I need to execute a php file in another asp file but i'm not so sure it's possible.
My server can run both asp and php and they run without any problems... I just need to find a way to include the execution results of the php file in the asp one.
Is it possible to use SSI and include the executed php file and then the executed asp file in a main ssi file?
I have installed PWS in windows 98 in each of the system at various places and put my Sales program files in the WWWROOT directory in all the branches. I'm afraid that the users may tamper my ASP files. Is there any way of converting .ASP files to .exe files so that the dont see my program.
View Replies View RelatedI was wondering how some sites let you search by using a form, then present the results as static .htm files.
The reason I ask is that I tend to use ASP to process form information, then give the user a list of results presented on an .asp page. The list is simply drawn from a database in real-time and formatted into a template page.
The problem with this is that search engines can't see any of the information in the database, since they can't do the form submission. Is there a way around this?
When DLLs are compiled in VB, in addition to the dll, there are also
exp and .lib files created. Can somebody tell me what these are for?
Do I need to include them when I deploy my application?
I want to include just the result of a PHP file within an ASP file. <--#include won't work, it just imports the text.Is there an alternate way to do this?
View Replies View RelatedChecking our IIS log files we often get the chinese bots probing our sites. My only concern at the moment is that when an item is called by ID (i.e. select category from table where categoryid = id) and the id is called from either a querystring or a form request, I use CLng (i.e. CLng(request.querystring("id")) to convert the id to a long int to prevent the bots injecting the variable with any non-numeric characters.
View Replies View Relatedhow can i do a ftp function to upload and downlaod file to the server without using a 3rd party component?
View Replies View Relatedcan somebody advise me, how to put a few text files into zip archive on IIS5
on user request on some asp page?
IYHO, if I have say 10 different product categories that extract their data
from say 10 text files or an Access DB, is it more efficient to have an ASP
for each product category to query each section or 1 which parses the lot??
The only reason I am asking is for multiple user access I have this strange
belief that if 1 page is getting requested and queried by 10 simultaneous
visitors then 'spreading the load' on different pages would help.
Is my logic correct or do the ISP fairies have this in hand??
when the user submit a form, all the form data's will be saved
as a pdf file
is it possible?
yes means. by what way we can get this..?
For doing this we have to use any third party tools..?
I would like to capture the data from a textarea box and save it to a file.
View Replies View Related