Comma Delimited List

How 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?

View Replies


ADVERTISEMENT

Comma Delimited List & Lookup Table

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.

View Replies View Related

Populate A Select List From A Comma Delimited Txt File

I would like to use ASP to populate a select list from a comma delimited txt file.....

View Replies View Related

Generate CSV Or Comma Delimited

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.

View Replies View Related

Comma Delimited Files

Whenever 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.

View Replies View Related

Comma Delimited Array

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 Related

ASP: Trying To Manipulate A Comma Delimited String

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 Related

Importing Comma Delimited File

I'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?

View Replies View Related

Create Comma-delimited File From .asp Recordset

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.

View Replies View Related

Form To Comma Delimited Text File

how to create a comma delimited text file from an asp form. Assume my fields are: Name, email, phone number.

View Replies View Related

Comma-separated List

I have a post-form that holds a listbox with mulitple selected items. When
the form is posted to the server ASP file, I want to loop through the
selected items, to insert each of them into a table. How do I do that?
If I execute the line:
Response.Write(Request.Form("ListBox")),
I get the list of selected values, separated by commas.

View Replies View Related

Searching A Comma Separated List

I have an Access database which contains a Table of
Books, and in that table their a field called 'KeyWords' which
is a comma separated list of keywords.

View Replies View Related

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 Replies View Related

Tab Delimited Results

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.

View Replies View Related

Read A Tab Delimited File In Asp

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 Related

Reading Text Delimited

I 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?

View Replies View Related

Tab-delimited Or CSV - Performance Difference?

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:

View Replies View Related

Reading Tab Delimited File Into An Array

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

%>

View Replies View Related

Read Tab Delimited File Into An Array With ASP

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);

View Replies View Related

Read Tab Delimited Text File

Anyone 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 Related

2 Dimendional Array From A Delimited String

I need to create a 2 dimensional array from a string with 2 kinds of delimiters
sample string: Code:

View Replies View Related

Checking For Duplication In An Array Or Delimited String

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:

View Replies View Related

How To Get Rid Of This Comma

If Trim(Request.QueryString("id")) <> "" Then
myarray = split(id," ")
whereclause=" id = " & myarray(0)
for counter=1 to ubound(myarray)
whereclause = whereclause & " OR id = " & myarray(counter)
next
SQL = SQL & whereclause
iCounter = iCounter + 1
End If
It gives this error:
[quote]
SELECT * FROM bible WHERE id = 1, OR id = 2

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error (comma) in query expression 'id = 1, OR id = 2'.
[QUOTE]

How do you get rid of this comma?

View Replies View Related

Add A Comma

how would i add a comma in the value of a x? i'll give you an example:

given
x = "123"

result:
x = "1,2,3," .

View Replies View Related

Mass Email Using CDONTS...how To Get The Emails Into A Delimited Variable

I 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

%>

View Replies View Related

Dropping A Comma

I am trying to post some data from the database to an XML file. Everything works except for a stray comma that comes from the database and exists at the end of the address string. For example, "123 Anywhere Street,"

I would like to kill that comma that will always exist at the end of the address string.

My initial thoughts:

oldaddr = request.form(business_address)
vbl = len(address) - 1
newaddr = left(oldaddr, vbl)

I tell it to do response.write on all variables involved, but for some reason the calculation is not being performed. No errors. What am I missing?

View Replies View Related

Comma Values

I have a string that can be "700,00" or "700" or "700,56". How can I obtain the content that is present after the comma, (as the examples, 00 , , 56. in a var?

View Replies View Related

Insert A CHR(10) After A Comma

I have an Email List where it shows all emails sperated by a comma and space. I want to insert a CHR(10) after each comma to make the list easier to read (in a textbox). How can I do it?

View Replies View Related

Unwanted Comma

I'm testing the output of variables passed from my 1st ASP to my 2nd ASP. Code:

View Replies View Related

Comma Comands

I was wanting to know how to take the following code and use it to update multiple fields
"sel" is a value set from a table field onto a checkbox. It returns a 3 digit number if submitted with only one check.

but if I submit multiple check, of course, it submits multiple 3 digit numbers seperated by a comma. I just need to know how to do a for(i) statement or a loop or whatever so that I can update multiple fields.

<%
If Request("Movebutton") <> "" then

Updsel = Request.Form("sel")
Upddate = Request.Form("Start_Date")
If Request.Form("End_Date") = "" then
Updenddate = Request.Form("Start_Date")
Else
Updenddate = Request.Form("End_Date")
End If

View Replies View Related

Prevent Unwanted Comma

This may not be possible on the server side, so apologies if this is the
wrong group for this post.My form consists of an unknown number of pairs of text boxes. They are named textbox_a and textbox_b. I then split the comma separated list
that gets posted:

textbox_a = split(Request.Form("textbox_a"),",")
for i = ubound(textbox_a)
...insert into db

then do the same for textbox_b

If anyone puts a comma into one of the text boxes, this will result in
unmatched pairs. How can I deal with the comma, or prevent it?

View Replies View Related

How Do I Test To See If A Comma Is Present ?

I am using this code below to count the number of variables after the comma:

jumvar = 43352352,325324452,235234452,24523454
jumvarsplt = split(jumvar,",")
valnum = CInt(ubound(jumvarsplt))

But i would like to know how to test if the variable has a comma before running the above code.

View Replies View Related

Hanlding Comma In A Field

I have form where one has to input officer's salary along with other data.
The officer's salary field is tied to a currency field in backend Access.
Right now folks enter numbers e.g. 30000.00. However, when someone is writing
30,000.00
a error message comes which shows syntax error. The sql statement via
response.write does not allow me to update the database. However, without the
comma, things are fine. Is there any way to create a error message, which
will not allow one to save the record, if comma is put in the salary value
e.g. 40,000.00?

View Replies View Related







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