entries in an oracle db, how to clean on the fly?

Results 1 to 4 of 4

Thread: entries in an oracle db, how to clean on the fly?

  1. #1
    genic Guest

    Default entries in an oracle db, how to clean on the fly?

    ok, here is what i have....a really simple thing.<BR>i call to a database, pull out information, and populate several form fields with that corresponding information.<BR>&#060;%<BR>selColo = Request.QueryString("selColo")<BR>selCity = Request.QueryString("selCity")<BR>%&#062;<BR>&#060 ;%<BR>sSql = "SELECT DISTINCT * FROM THEDATABASE WHERE COLO_ID = &#039" & selCity & "&#039"<BR>sSql = sSql & "AND COLLOCATION = &#039" & selColo & "&#039"&#039<BR>set rsTemp = objConn.Execute(sSql, lngRecs, adCmdText)<BR>%&#062;<BR><BR>and the form fields are populated like this.<BR><BR>value="&#060;%=rsTemp("selCity")%&#06 2;" <BR><BR>and so on.<BR>here is what happens. entries in the oracle DB without and # signs or blank entries close the record set, and cause an error ADODB.Field error &#039 80020009&#039<BR>Either BOF or EOF is True..etc..<BR><BR>..BUT...<BR>entries that do not have any # signs, or blank entries work great. i know its a simple form field validation, but how can i look for these cases, and strip them on the fly if somehow they are entered into a db (some entries are entered from other programs, and i can not validate those entries, but i have to strip that information on the fly so it will work properly)<BR><BR>any clues? please? no one has even bothered to look at this..for me

  2. #2
    genic Guest

    Default what, have i mystified everyone or what? come on n

    someone has to know how to do this, it shouldnt be that hard, i just cant find anything on this (or i am just stupid)

  3. #3
    Join Date
    Dec 1969

    Default RE: what, have i mystified everyone or what? come

    Most of us work against SQL Server, rather than Oracle. I don&#039t think this issue even exists for SQL server (unless I&#039ve misunderstood your question)<BR><BR>Dunc

  4. #4
    genic Guest

    Default it doesnt...thats why i am throwing things over he

    its another quirk about oracle..sql doesnt do it. i think i have some of if figured out. <BR><BR><BR>Function StripInvalidCharactersFromName(strValue)<BR> Dim lngPos<BR> Dim strNew<BR> Dim strChar<BR><BR> For lngPos = 1 To Len(strValue)<BR> strChar = Mid(strValue, lngPos, 1)<BR> If (asc(ucase(strChar))&#062;= 65 And asc(ucase(strChar))&#060;= 90) or IsNumeric(strChar) Then<BR> strNew = strNew & strChar<BR> Else<BR> Select Case strChar<BR> Case "#":<BR> strNew = strNew & strChar<BR> End Select<BR> End If<BR> Next<BR> StripInvalidCharactersFromName = strNew<BR>End Function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts