I have two pages: Page1.asp and page2.asp. Page1.asp do a loop and shows all products with some text fields to insert. When I press the insert button, all values are sent to page2.asp which does an split and insert all values using a for loop with arrays. The code in page2.asp is working Ok, but the problem is when I leave some records blank in page1.asp. I get the error: "Syntax error in INSERT INTO statement".

Here is the code I'm using in page2.asp:

Code:
Dim strPRO
Dim strMAR
Dim strSIZ
Dim strPRE
Dim strCANT
Dim strFECH

strPRO=Split(Request("pro_id"),",")
strMAR=Split(Request("mar_id"),",")
strSIZ=Split(Request("pro_size"),",")
strPRE=Split(Request("precio"),",")
strCANT=Split(Request("cantidad"),",")
strFECH=Split(Request("fecha"),",")


Dim Command1
set Command1 = Server.CreateObject("ADODB.Connection")
Command1.ConnectionString = MM_mprince_STRING
Command1.Open

Dim iLoop

for iLoop=0 to Ubound(strPRO)

strSQL = "insert into purchases (pro_id, mar_id, pur_size, pur_precio, pur_cantidad, pur_fecha) values ("&strPRO(iLoop)&","&strMAR(iLoop)&","&strSIZ(iLoop)&","&strPRE(iLoop)&","&strCANT(iLoop)&", #"&strFECH(iLoop)&"#)"
Command1.Execute strSQL
Next

Command1.Close
Set Command1 = Nothing

Response.redirect("page1.asp")
I would like to know how to insert null values o better to know how not to insert when there are null values.

I will appreciate any help about this matter.