Windows Vista Forums

split textbox
  1. #1


    RICK Guest

    split textbox

    Below is a bit of code that is causing me some headache. I am trying to
    split entry into a textbox with a ";" and upload each split to a new row in a
    database.

    The error I get is "Type name is invalid. "

    If I input a text string (e.g. "abc" in place of the variable
    "strPropaguleType2" I don't get the error. What am I doing wrong with
    strPropaguleType2?

    strPropaguleType2 = Split(Request.Form("txtPropaguleComment"), ";")
    for each field in strpropaguleType2
    Set rsPropaguleType = server.createobject("adodb.recordset")
    conn.webqry_InsertDateOfIntroduction_PropaguleType strtrtnumber, strtaxon,
    strPropaguleType2, strRandomNumber
    next




      My System SpecsSystem Spec

  2. #2


    ekkehard.horner Guest

    Re: split textbox

    RICK schrieb:

    > Below is a bit of code that is causing me some headache. I am trying to
    > split entry into a textbox with a ";" and upload each split to a new row in a
    > database.
    >
    > The error I get is "Type name is invalid. "
    >
    > If I input a text string (e.g. "abc" in place of the variable
    > "strPropaguleType2" I don't get the error. What am I doing wrong with
    > strPropaguleType2?
    >
    > strPropaguleType2 = Split(Request.Form("txtPropaguleComment"), ";")
    > for each field in strpropaguleType2
    > Set rsPropaguleType = server.createobject("adodb.recordset")
    > conn.webqry_InsertDateOfIntroduction_PropaguleType strtrtnumber, strtaxon,
    > strPropaguleType2, strRandomNumber
    > next
    >
    Despite your misleading type prefix "str", after

    strPropaguleType2 = Split(Request.Form("txtPropaguleComment"), ";")

    strPropaguleType2 will hold an array (returned by Split()). So check if
    your webqry_InsertDateOfIntroduction_PropaguleType really expects an array
    as third parameter. Perhaps you want to pass field (another not so good
    variable name, btw) instead?

      My System SpecsSystem Spec

split textbox problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Textbox Refresh. Jenny White VB Script 2 20 Dec 2009
Masked TextBox Horst Klein Avalon 1 21 Aug 2007
no textbox for password jaap Vista account administration 2 13 Aug 2007
Textbox AutoSize? everydaypanos Avalon 1 05 Apr 2007
.NET2 TextBox & DWM Jan Kucera Aero 2 10 Dec 2006