Selecting Single Character From A String

I have a page that will display a list of locations from an SQL DB. Users need to be able to sort and/or search these locations by industry

Each location has a 4 character desgnation, the 3rd character of which indicates industry. How do I query the DB in an ASP page to recognize ONLY the third character in the string?

View Replies


ADVERTISEMENT

How Can I Populate Many Fields By Selecting A Single Value From COMBO BOX

i should populate all the fields in the form just by selecting a single value in combo box. for example, my combo box contains client id s, and if i select an id, it should retreive the client name, address, coiuntry, city , fax etc.

how is this possible? if i use <select onchange="" > propety, i can change only a single value.

View Replies View Related

Reading Single Character

is it possible to read single characters from text files with ASP i have seen codes which read entire lines or entire text....but i couldnt find any function which reads single characters as the text file is read...

View Replies View Related

Single Unicode Character - How Many Bytes?

I've got a single Cyrillic character delivered from a db field to my script,
which displays correctly in my UTF-8 web page. This is the "backwards P"
which has the Unicode value of &H042F

But when I read it for writing to a file, what I see is a 4-byte value of
&HD0 00 AF 00 .

View Replies View Related

Selecting Part Of A String

I'm just starting out learning a bit of asp with my job so pardon my bad use of any jargon

In 'A:B:C: D:E' I want it to only return 'A:B:C: D'. Dropping off the content after and including the LAST :

Can anyone help?

View Replies View Related

Single Code String

I have a problem in inputing single code(') string into the SQL database. I wrote in ASP language and connect to the SQL server to insert the data.
If the data contains single code string (e.g women's group)the syntax error appears and it stops.
I tried to change the double code(")instead of single one to insert the data and then, it also has error "does not permit column name ...." or something like that.
How can i solve the problem to input the data that contains single code(')?

View Replies View Related

Seperating Data From Single Table Field (string)

I need a way of putting say 10 to 20 bullet points in one table field in an
Access database

- say seperate them with a special character, then build a bulletted list on
my page.

If I can get the page to detect each special character, insert a new bullet
and move on to the next occurance in the string... Code:

View Replies View Related

String Character

can someone please tell me how to add the " character to a string
i've already tried:
<%
dim string

string = "something"

string = string & """
%>
string should equal something" but doesn't work ?

View Replies View Related

Check Each Character Of A String?

What is the best way to check each character within a string?

For doing something like encryption, where you check character 1 and replace
it with a different character.. then check character 2 and replace it with a
different character.... etc.... until completing the string?

View Replies View Related

Character Count Of A String

I tried the strlen() func but to no avail. I am looping through a record set, if the length of a fields string is above a certain character count, say 50, I want to do one think, less than 50 do another?

View Replies View Related

Split String At A Certain Number Of Character

I have an input text area on a form the max field size in the database is 255 i need to split the string at the 250 caracter?

View Replies View Related

Detect Whats In A String After A Character

i have a browse button on a web form that the user can upload images via ftp. the user clicks on the browse button to browse a file on his computer and the text field displays the path - "mycomputerdesktopmyimage.jpg".

i need to get the name of the image and insert the name into my database. so i need to be able to search the string ("mycomputerdesktopmyimage.jpg") and insert all the characters after the last "" which will give me the image name. ive tried just writing out the string in asp (jscript), but it gives me "mycomputerdesktopmyimage.jpg" without all the backslashes.

how do i get those backslashes back into the string? my second question is how do i search for the characters after the last backslash? i know i can use a substring on this, but how can i use it for the last backslash?

View Replies View Related

Need To Break Up A String By Character Count

say i have a string that is "hello this is my string and i like it very
much" and i want to insert a newline at every 20th character, how could i go
about doing this?

View Replies View Related

Search String For Upper Case Character

Is it possible to search a string for a upper case character? Here is what I am trying to do:

I have the following string:

Quote: str = "ProjectSectionPlanning"
I'm trying to break this string into:

Quote: str = "Project Section Planning"

View Replies View Related

Syntax Error Converting From A Character String To Uniqueidentifier

I'm passing a unique identifier from page1 to page2 to page3 querried from MS SQL Server. When I pass the value, it puts the value in the curly brackets. (Page1 is for display and Page2 is for edit and Page3 is update edit)

When I go to Page3, it gives me an error saying "Syntax error converting from a character string to uniqueidentifier" {7171B9BD-4599-43D9-9521-3DA583A1BB1A} This is the value and the error page says "id=%7B7171B9BD-4599-43D9-9521-3DA583A1BB1A%7D" It seems tp put "%7B" and "%7D" for "{" and "}". Has anyone seen this?

I'm also passing numbers and text and they don't seem to have this problem, just the unique key.

View Replies View Related

XMLHTTP Character Issue - Converting Byte Array To String

I'm using Msxml2.ServerXMLHTTP.3.0 to fetch a HTML page on a remote
server. The fetched page is then parsed and the information of interest
is extracted and send to the client browser.

However, the remote server does not specify any character coding in its
headers. If using ResponseText property in ServerXMLHTTP, some
international characters are not decoded correctly. This is due to
ResponseText assuming UTF-8 coding if no character set is specified.

My solution is to use the ResponseBody property which returns the web
page as an array of unsigned bytes. I then convert the data to a string
using the ADODB.Stream method as described here:
http://www.motobit.com/tips/detpg_binarytostring/

The string is then parsed and the required information is pulled out.

This solution works just fine but I wonder if there is some more
efficient (without the need for a byte to string converion) way to
solve the problem.

View Replies View Related

Selecting Info

I've got a WYSIWYG editor, that runs off a template page (i.e. template.htm) that gets opened in an iFrame for editing.
How can I get it setup so I cange the template at the click of a button? I've tried doing a form with radio buttons, but can't get it to work.
For example, the iframe source has been set to "strTemplate". My form processing was along the lines of:

<%
If request.form "template" = "template1" then
strTemplate = "template1.htm"
Else
strTemplate = "template.htm"

If request.form "template" = "template2" then
strTemplate = "template2.htm"
Else
strTemplate = "template.htm"

End If
End If
%>

View Replies View Related

Selecting A Value From The List Box

I have a list box which has the following values:

Car
bike and Boat

If I select "car" it is fine but when I select "bike and boat" it just takes bike
as the selection. It is taking the space as the end of the string. Is there a way I can
rectify this?

View Replies View Related

Selecting Dropdown In ASP

My boss wanted me to add a dropdown to this form. I was able to add in the dropdown and it inserts into my database (Access) just fine. However, I have an edit page also and this is where my trouble comes in.

On the edit page, the dropdown does not "know" which specific option was selected. I tried to write an If statement but I think there is something wrong in my syntax. Code:

View Replies View Related

Selecting Software

I have undertaken a website revision project after not programming for about 6 years. I am beginning to set up a work environment on my pc, and have questions about the software being used verses what could be the ideal software.

I am familiar with classic asp pages, not asp.net. I am also familiar MS Interdev (but am unable to locate my copy and cannot find a torrent file - is this an archaic program now?). The last thing that I'll mentioned is that I prefer to have a debugging capabilities.So the current website uses Dreamweaver 8.0, IIS 6.0, and MSSQL 2000. Question.Given my background, what software would you use to set up a work station?

View Replies View Related

Selecting Values

i need to display results that do not match those in the database.I have an excel file and i upload it,inserting the records in a temp table. han i compare the values in the original table and the temp table.All i want is the values that do not match

sql = "SELECT TempSerial.SerialNo "&_
"FROM TempSerial, Serial WHERE TempSerial.SerialNo <> Serial.SerialNo "&_
"OrderBY TempSerial.SerialNo;"
Set RS = objConn.Execute(sql)

i displayed the records with <%=RS("SerialNo")%> but i get all the records in the temp table displyed.

View Replies View Related

Selecting Last Record

i need to extract some data from a table called accountantsBids. I want to select the last entry for every accountant based on the date descending.

Table:
entryid = Autonumber
Accountantid = FK
DatePosted

I've tried TOP 1 but that doesn't do it - it only gives one recordset. What would be the best way to get this working.

View Replies View Related

Selecting * After Date()

I have a database with date of gigs in it and am trying to select * from the database the next gig basically, and am compariung against todays date and saying select * more than todays date. Is this right, cause it's not doing it? Code:

dateN = Date()
set conn = Server.CreateObject("ADODB.Connection")
conn.Open "************"
set recsetS= server.createobject("ADODB.Recordset")
sql = "select * from admin where dated > "& dateN &" order by relevance DESC "
recsetS.open sql,conn,3,3

View Replies View Related

Selecting All Checkboxes Using ASP

I created a form for Deleting multiple records (from Access db )using checkboxes. However, I would like to add a link or button that would check mark all the checkboxes since I could have hundreds of records.

What is the best way to go about it. Does anyone knows of any samples other than Javascript.

View Replies View Related

ASP & XML - Selecting Last Node??

I was wondering if anyone has a moment to look over some code I've written?

I'm involved in the maintenance of an old CMS system I wrote a number of years ago, when I was regularly coding in ASP. These days it takes a while to mobilise the grey matter when it comes to ASP.

Anyhow, basically I am trying to select a specific node and determine the id of the last child of the parent node.

At the moment, I am only returning the first childs id, despite my best efforts. Code:

View Replies View Related

Selecting Ranges

On the online crm system i've built (using ASP) our customers can create a list of contacts and download/delete/add to this list when they want to and then go and view the list. It will display 20 on a page with forward/back buttons etc.

I have written a routine which queries the MS SQL 2000 database and retrieves all the IDs of the contacts. It will then work out the page it is on and display the appropriate records by reading through the 20 IDs for that page and query the data from each ID it needs to display on the screen.

This works fine for lists of up to 1000-2000 but when it gets to 5000, 10000 records it becomes an issue of performance as it will hold in a variable all of those 5000 or 10000 IDs. There has to be another way of doing this.

View Replies View Related

Selecting Count(distinct Value)

I want to select just one field to display using sql and I want to have another variable that counts how many fields of the same value there are. My code looks something like this but i'm getting an error...

ADODB.Recordset error '800a0cc1'

Item cannot be found in the collection corresponding to the requested name or ordinal. Code:

View Replies View Related

Selecting Random Images

Is it possible to select random images from a directory without creating a "library"

As in I want to have a directory with 25 or so images and want to randomly select an image without having to change the txt document when I add new images.

View Replies View Related

Selecting Which Page To View .ASP.

This is my page that displays a certain players games played below. It sorts by games played and excludes all records that = 0. Now with 9 different grades to show i did not want 9 different pages, so i added in 'strSortGames' so that they can select which grade to view and only one page is needed.

I used a menu (list field) on a previous page to do this, do you no a better way to do this? e.g Text links or some other way? or is a list field a fairly good way? Code:

View Replies View Related

Selecting DB Results Where First Letter = ?

What query would I have to use to select entries from a database where there first letter is a letter of the alphabet? ie. Select all entries starting with an A etc.

View Replies View Related

Selecting Distinct Intervals

I need help programming a search function. I want to narrow down a search function regarding time. I figure the best way to do this is to select a higher interval and a lower interval, and then have an sql function that grabs the times from within that range.Code:

sql = "SELECT DISTINCT place, time FROM bussystem WHERE time >= '"&timey&"'"
Set rscurrent = Server.CreateObject("ADODB.Recordset")
rscurrent.Open sql, conn, 3, 3

sql = "SELECT DISTINCT place, time FROM bussystem WHERE time <= '"&timey&"'"
Set rsrecent = Server.CreateObject("ADODB.Recordset")
rsrecent.Open sql, conn, 3, 3

View Replies View Related

Selecting All12 Months

Is it possible to select all twelve months in one select query either from a single field name or through an alias name?
I have a field name that conatins dates, and I would like to arrange the value of each month in a grid, jan-dec, monday-saturday. can I accomplish this with one select statement using an access db?

View Replies View Related

Inserting And Selecting Image From DB

I need Help in inserting the user image in my data base. but
unfortunatly I don't know how.I'm using asp with sql server. I tried to
insert the image and i geuss it worked.for the field in the db in not
null and it have this value <Binary> . but when i try to select it in
gives me this error "An unhandled data type was encountered".
this is my code :

View Replies View Related







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