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


ADVERTISEMENT

Simple Test Script To To Send A Test Email Using CDO

I am building a shopping cart where orders are send by email. Even though it says it's sent, I receive nothing. So I did a test script to send an email using CDO since we are using an exchange server for email and it's on the same network as the site. Code:

View Replies View Related

Asp Zip Files And Present Link

how do i zip 20 text files in asp then present a download link.

View Replies View Related

Add Information If The Fields Are Present

I have a file which is performing a mail merge. It grabs data from the database and then merges with the bookmarks in a template document if the fields are present.

I have set write permissions on the docs folder it should be saving the file to but when I redirect to the file its not being saved.

Not sure whats happening here....hope someone can shed some light or help me in building another script. The main feature i need to add to the mail merge is the ability to only add information if the fields are present. Code:

View Replies View Related

Dynamic Hyperlinking Only If Url Is Present

I currently have a page that list the schools, address, city etc but would like the url to be hyperlinked to the school field without having to create a new column. With the code below, it obviously creates a hyperlink to every school field regardless if the url field in the database is null or not. Code:

View Replies View Related

Check If File Present

The Codes mentioned below test to see whether the File named Mobile.txt exists or not. Is there any code that tests to see whether any Files (not a particular file) is present in a folder or not?

<%
Set MyFileObject = Server.CreateObject("Scripting.FileSystemObject")
If MyFileObject.FileExists("C:Mobile.txt") Then
Response.Write("I exist!")
Else
Response.Write("I do not exist!")
End If
%>

View Replies View Related

Invalid Attempt To Read When No Data Is Present.

I callup the aspx file in IE and the form comes up just fine. When I select a person to update, I get the subject error. Aparently, when I select a person, it's not selecting anyone and returning this error. Here's the full error:

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code:

View Replies View Related

Filesystemobject Error :: Necessary Dll Scrrun.dll Is Present In System32 Folder

I've downloaded this code from Web. While executing this, the following error msg appears, The page cannot be displayed. The necessary dll scrrun.dll is present in System32 folder. 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

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

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

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

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

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

Comma Seperated Numbers

I have a problem to creating one of my pages which is in ASP. wish someone can help me with this problem.

well, I have a dropdown box which allows multiple selection. and this is in the form that send the values of the selected options in dropdown box (which the values are numeric) to the access database.

all of the proccess in send to database is ok and all of the selected values in the datafield on database is seperated with comma like this: Code:

View Replies View Related

I Want To Delete Clovers And The Comma

I have a sort of shopping cart im developing. I have a string named "mystring".
mystring = "spices,tomatoes,clovers,watermelons" I want to delete clovers and the comma.

So newstring = "spices,tomatoes,watermelons" I was wondering what method I could use to convert "mystring" to "newstring", and the newstring won't have the clovers or the comma.

View Replies View Related

SQL WHERE Statement That Retrives Value Seperated By Comma

I have a database with a field called test which holds the value 1,2 (1 comma 2). The
value has been added through a checkbox. Now I want to write an SQL statement that
SELECTS both the value 1 and 2. If test had the values 1 and 2 in seperetaed fileds I would write something like:

SELECT * FROM X WHERE test = '1' OR test ='2'

But how can I do this when there is a comma? I want to know how I can check if the value test has the value 1 or value 2 directly in the SQL statment. Is this possible?

Maybe the only soloution is to retrive the values from test and then split them into two
variables and then to the value check later in the 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

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

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

Turning A Comma Delineated String Into An Array

I've never been able to get my head round arrays, and despite expensive googling I can't work out how to sort this problem:

I have a simple shopping cart that attaches a stock ID number and a quantity to a session variable. Each item selected is added to the session("cart") as "ID.Quantity" and divided by a comma. Thus the string is "12.7,3.45,8.9" etc.

Can anyone show me how to turn this into a two dimensional array, so I can get the relevant records for each ID from my database and match it to the number requested? Splitting the string by comma and then by full-stop has beaten me.

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

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

Regular Expression :: Split By Comma (CSV File)

I have a sting that have to be split by comma (cvs file)

Let me give you an example:

this is my string:
asd,asd,asd,"asd,asd,asd",asd,asd

I have to split this string but the string that is in quote I dont whant to be splited

result have to be like that:

Array(
[0]=>asd
[1]=>asd
[2]=>asd
[3]=>"asd,asd,asd"
[4]=>asd
[5]=>asd
)

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







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