p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: code problem in checkbox


Message #1 by "Chong" <kokcheong@g...> on Fri, 27 Jul 2001 06:44:05
 Hello there, maybe the problem is this. For the colum name i supose that
the productId is a kind of number (int, long, float, etc) and u are trying
to insert the value as a string ('"&splitIT(k)&"'). I hpe that i resolve
your problem.

Best regards, (Nuno Pinto)

-----------------------------------------------------
Nuno Pinto              |            www.techlado.com
Sócio Gerente           |               Apartado 3052
Analista Programador    | Zona Industrial de Tabueira
npinto@t...     |           3800 Aveiro Codex
+xxx xxx xxx xxx        |            +xxx xxx xxx xxx
-----------------------------------------------------

-----Original Message-----
From: Chong [mailto:kokcheong@g...]
Sent: sexta-feira, 27 de Julho de 2001 8:50
To: Code Clinic
Subject: [proasp_codeclinic] code problem in checkbox


what is wrong wit my code here?can anyone help?it keep giving me error
message in the values of the insert command.

 DIM splitIT
 DIM k
 splitIT = Split(proId,",")
 FOR k = 1 TO UBOUND(splitIT)
 IF cSTR( productId ) = TRIM( cSTR( splitIT( k ) ) ) THEN

	rfq_insert = "insert into database(productId) values ('"&splitIT(k)
&"')"

	dataconnection.execute rfq_insert

 END IF
 NEXT

p.s. proId is the variable from my form that i checked and productId is
the default value.
proId is a checkbox value



  Return to Index