Wrox Programmer Forums
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 12th, 2004, 11:29 PM
Authorized User
Join Date: Dec 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Special Character

Ok am fairly new to ASP. managed to display data thats only to left side of a special character "ý". Problem - What if the field does not have special character. Getting the following error message

Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'Mid'
/civil.asp, line 412

Following code where error takes place:

<td width="420" nowrap>&nbsp<%
Dim strPtext, strPname, strPchar, intPcount
strPchar = "ý"
strPtext = objRs("p_name")
intPcount = Instr(strPtext, strPchar)
strPname = mid(strPtext, 1, intPcount-1)
Response.Write strPname

Dire need of help!!!

Old December 13th, 2004, 12:49 AM
Friend of Wrox
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts

Before calling mid function, you can check the count of intPcount variable. call mid function only when you find the special char.

Om Prakash
Old December 13th, 2004, 11:12 AM
Authorized User
Join Date: Dec 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts

thanks Om Prakash, you were a big help. Was able to make it work with your advice. Again many thanks.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Losing special character data mussitsch Classic ASP Professional 4 September 5th, 2006 02:29 PM
Validation for special character nazneen Java GUI 5 February 13th, 2006 03:13 PM
Decimal code for a special character mcinar HTML Code Clinic 14 February 4th, 2005 01:56 PM
finding the string before a special character srini XSLT 2 December 16th, 2003 07:57 AM
HELP!!! the problem of handling special character kemin Classic ASP Databases 1 December 13th, 2003 01:31 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.