Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - split textbox

Reply
 
Old 06-03-2008   #1 (permalink)
RICK


 
 

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
Old 06-03-2008   #2 (permalink)
ekkehard.horner


 
 

Re: split textbox

RICK schrieb:
Quote:

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

Thread Tools


Similar Threads
Thread Forum
invalidate textbox .NET General
no textbox for password Vista account administration


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46