Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: How many variables can a form pass to Access?


Message #1 by "Troy Wise" <passlake@h...> on Wed, 26 Feb 2003 18:54:25
I have a 59-variable survey that chokes.  I define all variables, then try 
to pass them, but I get the following error:


Microsoft OLE DB Provider for ODBC Drivers error '80040e14' 

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) 
in query 
expression 'sdfg','sdfg','sdfg','AL','343','3434','troy@k...','asf
g','Yes','Flavor was just right','Saltiness was just right','Chip was just 
right','Yes'. 

/admin/admin/survey_first_add.asp, line 67 


Here's the code...


<%
Set onm = Request.Form("name")
Set oad = Request.Form("address")
Set ocy = Request.Form("city")
Set ost = Request.Form("state")
Set ozp = Request.Form("zip")
Set oph = Request.Form("phone")
Set oem = Request.Form("email")
Set oin = Request.Form("oin")
Set whp = Request.Form("wherePurchased")
Set pur = Request.Form("purchased")
Set ssfla = Request.Form("ssFlavor")
Set sssal = Request.Form("sssalt")
Set sssoi = Request.Form("ssoil")
Set sslta = Request.Form("ssLikeTaste")
Set sswta = Request.Form("ssWhyTaste")
Set sslte = Request.Form("ssLikeTexture")
Set sswte = Request.Form("ssWhyTexture")
Set ssprp = Request.Form("ssPricePaid")
Set ssprf = Request.Form("ssPriceFeeling")
Set sswmb = Request.Form("ssWhatMadeBuy")
Set sswba = Request.Form("ssWouldBuyAgain")
Set sswbw = Request.Form("ssWouldBuyWhy")
Set bbqfla = Request.Form("bbqFlavor")
Set bbqsal = Request.Form("bbqsalt")
Set bbqoi = Request.Form("bbqoil")
Set bbqlta = Request.Form("bbqLikeTaste")
Set bbqwta = Request.Form("bbqWhyTaste")
Set bbqlte = Request.Form("bbqLikeTexture")
Set bbqwte = Request.Form("bbqWhyTexture")
Set bbqprp = Request.Form("bbqPricePaid")
Set bbqprf = Request.Form("bbqPriceFeeling")
Set bbqwmb = Request.Form("bbqWhatMadeBuy")
Set bbqwba = Request.Form("bbqWouldBuyAgain")
Set bbqwbw = Request.Form("bbqWouldBuyWhy")
Set csfla = Request.Form("csFlavor")
Set cssal = Request.Form("cssalt")
Set csoi = Request.Form("csoil")
Set cslta = Request.Form("csLikeTaste")
Set cswta = Request.Form("csWhyTaste")
Set cslte = Request.Form("csLikeTexture")
Set cswte = Request.Form("csWhyTexture")
Set csprp = Request.Form("csPricePaid")
Set csprf = Request.Form("csPriceFeeling")
Set cswmb = Request.Form("csWhatMadeBuy")
Set cswba = Request.Form("csWouldBuyAgain")
Set cswbw = Request.Form("csWouldBuyWhy")
Set scofla = Request.Form("scoFlavor")
Set scosal = Request.Form("scosalt")
Set scoil = Request.Form("scooil")
Set scolta = Request.Form("scoLikeTaste")
Set scowta = Request.Form("scoWhyTaste")
Set scolte = Request.Form("scoLikeTexture")
Set scowte = Request.Form("scoWhyTexture")
Set scoprp = Request.Form("scoPricePaid")
Set scoprf = Request.Form("scoPriceFeeling")
Set scowmb = Request.Form("scoWhatMadeBuy")
Set scowba = Request.Form("scoWouldBuyAgain")
Set scowbw = Request.Form("scoWouldBuyWhy")
	IF oin <> "1" Then
		oin = "0"
		END IF
Set connectionDSNtemp=Server.CreateObject("adodb.connection")
connectionDSNtemp.ConnectionTimeout=60
connectionDSNtemp.Open "dsn=kmc-mrk"
SQL = "Insert INTO survey 
(name,address,city,state,zip,phone,email,wherePurchased,purchased,ssflavor,
sssalt,ssoil,ssliketaste,sswhytaste,ssliketexture,sswhytexture,sspricepaid,
sspricefeeling,sswhatmadebuy,sswouldbuyagain,sswouldbuywhy,bbqflavor,bbqsal
t,bbqoil,bbqliketaste,bbqwhytaste,bbqliketexture,bbqwhytexture,bbqpricepaid
,bbqpricefeeling,bbqwhatmadebuy,bbqwouldbuyagain,bbqwouldbuywhy,csflavor,cs
salt,csoil,csliketaste,cswhytaste,csliketexture,cswhytexture,cspricepaid,cs
pricefeeling,cswhatmadebuy,cswouldbuyagain,cswouldbuywhy,scoflavor,scosalt,
scooil,scoliketaste,scowhytaste,scoliketexture,scowhytexture,scopricepaid,s
copricefeeling,scowhatmadebuy,scowouldbuyagain,scowouldbuywhy) Values (" & 
onm & "','" & oad & "','" & ocy & "','" & ost & "','" & ozp & "','" & oph 
& "','" & oem & "','" & whp & "','" & pur & "','" & ssfla & "','" & sssal 
& "','" & sssoi & "','" & sslta & "','" & sswta & "','" & sslte & "','" & 
sswte & "','" & ssprp & "','" & ssprf & "','" & sswmb & "','" & sswba 
& "','" & sswbw & "','" & bbqfla & "','" & bbqsal & "','" & bbqoi & "','" 
& bbqlta & "','" & bbqwta & "','" & bbqlte & "','" & bbqwte & "','" & 
bbqprp & "','" & bbqprf & "','" & bbqwmb & "','" & bbqwba & "','" & bbqwbw 
& "','" & csfla & "','" & cssal & "','" & csoi & "','" & cslta & "','" & 
cswta & "','" & cslte & "','" & cswte & "','" & csprp & "','" & csprf 
& "','" & cswmb & "','" & cswba & "','" & cswbw & "','" & scofla & "','" & 
scosal & "','" & scoil & "','" & scolta & "','" & scowta & "','" & scolte 
& "','" & scowte & "','" & scoprp & "','" & scoprf & "','" & scowmb 
& "','" & scowba & "','" & scowbw & ")"
connectionDSNtemp.Execute(SQL)
OPTIN = "Insert INTO permmktg 
(oname,oaddress,ocity,ostate,ozip,ophone,oemail,oin) Values ('" & onm 
& "','" & oad & "','" & ocy & "','" & ost & "','" & ozp & "','" & oph 
& "','" & oem & "','" & oin & "')"
OPTOUT = "Insert INTO permout 
(nname,naddress,ncity,nstate,nzip,nphone,nemail,nin) Values ('" & onm 
& "','" & oad & "','" & ocy & "','" & ost & "','" & ozp & "','" & oph 
& "','" & oem & "','" & oin & "')"
IF oin = "1" then 
connectionDSNtemp.Execute(OPTIN)
connectionDSNtemp.Close
END IF
IF oin = "0" then
connectionDSNtemp.Execute(OPTOUT)
connectionDSNtemp.Close
END IF
Set connectionDSNtemp=Nothing
Response.Redirect "../../Survey-thanks.asp"
%>


Any thoughts????  Help is much appreciated!!!

Troy
Message #2 by "Jae Hou" <jae@s...> on Wed, 26 Feb 2003 19:10:04
Unless there is a typo...in your first INSERT statement, you are missing 
a "'" prior to your first VALUE.  Should be...

 opricefeeling,scowhatmadebuy,scowouldbuyagain,scowouldbuywhy) Values ('"

HTH.

> I have a 59-variable survey that chokes.  I define all variables, then 
try 
t> o pass them, but I get the following error:

> 
M> icrosoft OLE DB Provider for ODBC Drivers error '80040e14' 

> [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing 
operator) 
i> n query 
e> 
xpression 'sdfg','sdfg','sdfg','AL','343','3434','troy@k...','asf
g> ','Yes','Flavor was just right','Saltiness was just right','Chip was 
just 
r> ight','Yes'. 

> /admin/admin/survey_first_add.asp, line 67 

> 
H> ere's the code...

> 
<> %
S> et onm = Request.Form("name")
S> et oad = Request.Form("address")
S> et ocy = Request.Form("city")
S> et ost = Request.Form("state")
S> et ozp = Request.Form("zip")
S> et oph = Request.Form("phone")
S> et oem = Request.Form("email")
S> et oin = Request.Form("oin")
S> et whp = Request.Form("wherePurchased")
S> et pur = Request.Form("purchased")
S> et ssfla = Request.Form("ssFlavor")
S> et sssal = Request.Form("sssalt")
S> et sssoi = Request.Form("ssoil")
S> et sslta = Request.Form("ssLikeTaste")
S> et sswta = Request.Form("ssWhyTaste")
S> et sslte = Request.Form("ssLikeTexture")
S> et sswte = Request.Form("ssWhyTexture")
S> et ssprp = Request.Form("ssPricePaid")
S> et ssprf = Request.Form("ssPriceFeeling")
S> et sswmb = Request.Form("ssWhatMadeBuy")
S> et sswba = Request.Form("ssWouldBuyAgain")
S> et sswbw = Request.Form("ssWouldBuyWhy")
S> et bbqfla = Request.Form("bbqFlavor")
S> et bbqsal = Request.Form("bbqsalt")
S> et bbqoi = Request.Form("bbqoil")
S> et bbqlta = Request.Form("bbqLikeTaste")
S> et bbqwta = Request.Form("bbqWhyTaste")
S> et bbqlte = Request.Form("bbqLikeTexture")
S> et bbqwte = Request.Form("bbqWhyTexture")
S> et bbqprp = Request.Form("bbqPricePaid")
S> et bbqprf = Request.Form("bbqPriceFeeling")
S> et bbqwmb = Request.Form("bbqWhatMadeBuy")
S> et bbqwba = Request.Form("bbqWouldBuyAgain")
S> et bbqwbw = Request.Form("bbqWouldBuyWhy")
S> et csfla = Request.Form("csFlavor")
S> et cssal = Request.Form("cssalt")
S> et csoi = Request.Form("csoil")
S> et cslta = Request.Form("csLikeTaste")
S> et cswta = Request.Form("csWhyTaste")
S> et cslte = Request.Form("csLikeTexture")
S> et cswte = Request.Form("csWhyTexture")
S> et csprp = Request.Form("csPricePaid")
S> et csprf = Request.Form("csPriceFeeling")
S> et cswmb = Request.Form("csWhatMadeBuy")
S> et cswba = Request.Form("csWouldBuyAgain")
S> et cswbw = Request.Form("csWouldBuyWhy")
S> et scofla = Request.Form("scoFlavor")
S> et scosal = Request.Form("scosalt")
S> et scoil = Request.Form("scooil")
S> et scolta = Request.Form("scoLikeTaste")
S> et scowta = Request.Form("scoWhyTaste")
S> et scolte = Request.Form("scoLikeTexture")
S> et scowte = Request.Form("scoWhyTexture")
S> et scoprp = Request.Form("scoPricePaid")
S> et scoprf = Request.Form("scoPriceFeeling")
S> et scowmb = Request.Form("scoWhatMadeBuy")
S> et scowba = Request.Form("scoWouldBuyAgain")
S> et scowbw = Request.Form("scoWouldBuyWhy")
	> IF oin <> "1" Then
	> 	oin = "0"
	> 	END IF
S> et connectionDSNtemp=Server.CreateObject("adodb.connection")
c> onnectionDSNtemp.ConnectionTimeout=60
c> onnectionDSNtemp.Open "dsn=kmc-mrk"
S> QL = "Insert INTO survey 
(> 
name,address,city,state,zip,phone,email,wherePurchased,purchased,ssflavor,
s> 
ssalt,ssoil,ssliketaste,sswhytaste,ssliketexture,sswhytexture,sspricepaid,
s> 
spricefeeling,sswhatmadebuy,sswouldbuyagain,sswouldbuywhy,bbqflavor,bbqsal
t> ,bbqoil,bbqliketaste,bbqwhytaste,bbqliketexture,bbqwhytexture,bbqpricepa
id
,> 
bbqpricefeeling,bbqwhatmadebuy,bbqwouldbuyagain,bbqwouldbuywhy,csflavor,cs
s> 
alt,csoil,csliketaste,cswhytaste,csliketexture,cswhytexture,cspricepaid,cs
p> 
ricefeeling,cswhatmadebuy,cswouldbuyagain,cswouldbuywhy,scoflavor,scosalt,
s> 
cooil,scoliketaste,scowhytaste,scoliketexture,scowhytexture,scopricepaid,s
c> opricefeeling,scowhatmadebuy,scowouldbuyagain,scowouldbuywhy) Values (" 
& 
o> nm & "','" & oad & "','" & ocy & "','" & ost & "','" & ozp & "','" & 
oph 
&>  "','" & oem & "','" & whp & "','" & pur & "','" & ssfla & "','" & 
sssal 
&>  "','" & sssoi & "','" & sslta & "','" & sswta & "','" & sslte & "','" 
& 
s> swte & "','" & ssprp & "','" & ssprf & "','" & sswmb & "','" & sswba 
&>  "','" & sswbw & "','" & bbqfla & "','" & bbqsal & "','" & bbqoi 
& "','" 
&>  bbqlta & "','" & bbqwta & "','" & bbqlte & "','" & bbqwte & "','" & 
b> bqprp & "','" & bbqprf & "','" & bbqwmb & "','" & bbqwba & "','" & 
bbqwbw 
&>  "','" & csfla & "','" & cssal & "','" & csoi & "','" & cslta & "','" & 
c> swta & "','" & cslte & "','" & cswte & "','" & csprp & "','" & csprf 
&>  "','" & cswmb & "','" & cswba & "','" & cswbw & "','" & scofla & "','" 
& 
s> cosal & "','" & scoil & "','" & scolta & "','" & scowta & "','" & 
scolte 
&>  "','" & scowte & "','" & scoprp & "','" & scoprf & "','" & scowmb 
&>  "','" & scowba & "','" & scowbw & ")"
c> onnectionDSNtemp.Execute(SQL)
O> PTIN = "Insert INTO permmktg 
(> oname,oaddress,ocity,ostate,ozip,ophone,oemail,oin) Values ('" & onm 
&>  "','" & oad & "','" & ocy & "','" & ost & "','" & ozp & "','" & oph 
&>  "','" & oem & "','" & oin & "')"
O> PTOUT = "Insert INTO permout 
(> nname,naddress,ncity,nstate,nzip,nphone,nemail,nin) Values ('" & onm 
&>  "','" & oad & "','" & ocy & "','" & ost & "','" & ozp & "','" & oph 
&>  "','" & oem & "','" & oin & "')"
I> F oin = "1" then 
c> onnectionDSNtemp.Execute(OPTIN)
c> onnectionDSNtemp.Close
E> ND IF
I> F oin = "0" then
c> onnectionDSNtemp.Execute(OPTOUT)
c> onnectionDSNtemp.Close
E> ND IF
S> et connectionDSNtemp=Nothing
R> esponse.Redirect "../../Survey-thanks.asp"
%> >

> 
A> ny thoughts????  Help is much appreciated!!!

> Troy
Message #3 by gary.routh2@v... on Wed, 26 Feb 2003 22:23:18
> I have a 59-variable survey that chokes.  I define all variables, then 
try 
t> o pass them, but I get the following error:

> 
M> icrosoft OLE DB Provider for ODBC Drivers error '80040e14' 

> [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing 
operator) 
i> n query 
e> 
xpression 'sdfg','sdfg','sdfg','AL','343','3434','troy@k...','asf
g> ','Yes','Flavor was just right','Saltiness was just right','Chip was 
just 
r> ight','Yes'. 

> /admin/admin/survey_first_add.asp, line 67 

> 
H> ere's the code...

> 
<> %
S> et onm = Request.Form("name")
S> et oad = Request.Form("address")
S> et ocy = Request.Form("city")
S> et ost = Request.Form("state")
S> et ozp = Request.Form("zip")
S> et oph = Request.Form("phone")
S> et oem = Request.Form("email")
S> et oin = Request.Form("oin")
S> et whp = Request.Form("wherePurchased")
S> et pur = Request.Form("purchased")
S> et ssfla = Request.Form("ssFlavor")
S> et sssal = Request.Form("sssalt")
S> et sssoi = Request.Form("ssoil")
S> et sslta = Request.Form("ssLikeTaste")
S> et sswta = Request.Form("ssWhyTaste")
S> et sslte = Request.Form("ssLikeTexture")
S> et sswte = Request.Form("ssWhyTexture")
S> et ssprp = Request.Form("ssPricePaid")
S> et ssprf = Request.Form("ssPriceFeeling")
S> et sswmb = Request.Form("ssWhatMadeBuy")
S> et sswba = Request.Form("ssWouldBuyAgain")
S> et sswbw = Request.Form("ssWouldBuyWhy")
S> et bbqfla = Request.Form("bbqFlavor")
S> et bbqsal = Request.Form("bbqsalt")
S> et bbqoi = Request.Form("bbqoil")
S> et bbqlta = Request.Form("bbqLikeTaste")
S> et bbqwta = Request.Form("bbqWhyTaste")
S> et bbqlte = Request.Form("bbqLikeTexture")
S> et bbqwte = Request.Form("bbqWhyTexture")
S> et bbqprp = Request.Form("bbqPricePaid")
S> et bbqprf = Request.Form("bbqPriceFeeling")
S> et bbqwmb = Request.Form("bbqWhatMadeBuy")
S> et bbqwba = Request.Form("bbqWouldBuyAgain")
S> et bbqwbw = Request.Form("bbqWouldBuyWhy")
S> et csfla = Request.Form("csFlavor")
S> et cssal = Request.Form("cssalt")
S> et csoi = Request.Form("csoil")
S> et cslta = Request.Form("csLikeTaste")
S> et cswta = Request.Form("csWhyTaste")
S> et cslte = Request.Form("csLikeTexture")
S> et cswte = Request.Form("csWhyTexture")
S> et csprp = Request.Form("csPricePaid")
S> et csprf = Request.Form("csPriceFeeling")
S> et cswmb = Request.Form("csWhatMadeBuy")
S> et cswba = Request.Form("csWouldBuyAgain")
S> et cswbw = Request.Form("csWouldBuyWhy")
S> et scofla = Request.Form("scoFlavor")
S> et scosal = Request.Form("scosalt")
S> et scoil = Request.Form("scooil")
S> et scolta = Request.Form("scoLikeTaste")
S> et scowta = Request.Form("scoWhyTaste")
S> et scolte = Request.Form("scoLikeTexture")
S> et scowte = Request.Form("scoWhyTexture")
S> et scoprp = Request.Form("scoPricePaid")
S> et scoprf = Request.Form("scoPriceFeeling")
S> et scowmb = Request.Form("scoWhatMadeBuy")
S> et scowba = Request.Form("scoWouldBuyAgain")
S> et scowbw = Request.Form("scoWouldBuyWhy")
	> IF oin <> "1" Then
	> 	oin = "0"
	> 	END IF
S> et connectionDSNtemp=Server.CreateObject("adodb.connection")
c> onnectionDSNtemp.ConnectionTimeout=60
c> onnectionDSNtemp.Open "dsn=kmc-mrk"
S> QL = "Insert INTO survey 
(> 
name,address,city,state,zip,phone,email,wherePurchased,purchased,ssflavor,
s> 
ssalt,ssoil,ssliketaste,sswhytaste,ssliketexture,sswhytexture,sspricepaid,
s> 
spricefeeling,sswhatmadebuy,sswouldbuyagain,sswouldbuywhy,bbqflavor,bbqsal
t> ,bbqoil,bbqliketaste,bbqwhytaste,bbqliketexture,bbqwhytexture,bbqpricepa
id
,> 
bbqpricefeeling,bbqwhatmadebuy,bbqwouldbuyagain,bbqwouldbuywhy,csflavor,cs
s> 
alt,csoil,csliketaste,cswhytaste,csliketexture,cswhytexture,cspricepaid,cs
p> 
ricefeeling,cswhatmadebuy,cswouldbuyagain,cswouldbuywhy,scoflavor,scosalt,
s> 
cooil,scoliketaste,scowhytaste,scoliketexture,scowhytexture,scopricepaid,s
c> opricefeeling,scowhatmadebuy,scowouldbuyagain,scowouldbuywhy) Values (" 
& 
o> nm & "','" & oad & "','" & ocy & "','" & ost & "','" & ozp & "','" & 
oph 
&>  "','" & oem & "','" & whp & "','" & pur & "','" & ssfla & "','" & 
sssal 
&>  "','" & sssoi & "','" & sslta & "','" & sswta & "','" & sslte & "','" 
& 
s> swte & "','" & ssprp & "','" & ssprf & "','" & sswmb & "','" & sswba 
&>  "','" & sswbw & "','" & bbqfla & "','" & bbqsal & "','" & bbqoi 
& "','" 
&>  bbqlta & "','" & bbqwta & "','" & bbqlte & "','" & bbqwte & "','" & 
b> bqprp & "','" & bbqprf & "','" & bbqwmb & "','" & bbqwba & "','" & 
bbqwbw 
&>  "','" & csfla & "','" & cssal & "','" & csoi & "','" & cslta & "','" & 
c> swta & "','" & cslte & "','" & cswte & "','" & csprp & "','" & csprf 
&>  "','" & cswmb & "','" & cswba & "','" & cswbw & "','" & scofla & "','" 
& 
s> cosal & "','" & scoil & "','" & scolta & "','" & scowta & "','" & 
scolte 
&>  "','" & scowte & "','" & scoprp & "','" & scoprf & "','" & scowmb 
&>  "','" & scowba & "','" & scowbw & ")"
c> onnectionDSNtemp.Execute(SQL)
O> PTIN = "Insert INTO permmktg 
(> oname,oaddress,ocity,ostate,ozip,ophone,oemail,oin) Values ('" & onm 
&>  "','" & oad & "','" & ocy & "','" & ost & "','" & ozp & "','" & oph 
&>  "','" & oem & "','" & oin & "')"
O> PTOUT = "Insert INTO permout 
(> nname,naddress,ncity,nstate,nzip,nphone,nemail,nin) Values ('" & onm 
&>  "','" & oad & "','" & ocy & "','" & ost & "','" & ozp & "','" & oph 
&>  "','" & oem & "','" & oin & "')"
I> F oin = "1" then 
c> onnectionDSNtemp.Execute(OPTIN)
c> onnectionDSNtemp.Close
E> ND IF
I> F oin = "0" then
c> onnectionDSNtemp.Execute(OPTOUT)
c> onnectionDSNtemp.Close
E> ND IF
S> et connectionDSNtemp=Nothing
R> esponse.Redirect "../../Survey-thanks.asp"
%> >

> 
A> ny thoughts????  Help is much appreciated!!!

> Troy
Message #4 by gary.routh2@v... on Wed, 26 Feb 2003 22:26:50
Obviuosly I'm new at this!  Sorry for the blank post.  Anyway, my comment 
is... is your price paid a numeric field in the database?  If so, you may 
need to remove the quotes around the value being passed for ssprp and 
scoprp.

glr


> I have a 59-variable survey that chokes.  I define all variables, then 
try 
t> o pass them, but I get the following error:

> 
M> icrosoft OLE DB Provider for ODBC Drivers error '80040e14' 

> [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing 
operator) 
i> n query 
e> 
xpression 'sdfg','sdfg','sdfg','AL','343','3434','troy@k...','asf
g> ','Yes','Flavor was just right','Saltiness was just right','Chip was 
just 
r> ight','Yes'. 

> /admin/admin/survey_first_add.asp, line 67 

> 
H> ere's the code...

> 
<> %
S> et onm = Request.Form("name")
S> et oad = Request.Form("address")
S> et ocy = Request.Form("city")
S> et ost = Request.Form("state")
S> et ozp = Request.Form("zip")
S> et oph = Request.Form("phone")
S> et oem = Request.Form("email")
S> et oin = Request.Form("oin")
S> et whp = Request.Form("wherePurchased")
S> et pur = Request.Form("purchased")
S> et ssfla = Request.Form("ssFlavor")
S> et sssal = Request.Form("sssalt")
S> et sssoi = Request.Form("ssoil")
S> et sslta = Request.Form("ssLikeTaste")
S> et sswta = Request.Form("ssWhyTaste")
S> et sslte = Request.Form("ssLikeTexture")
S> et sswte = Request.Form("ssWhyTexture")
S> et ssprp = Request.Form("ssPricePaid")
S> et ssprf = Request.Form("ssPriceFeeling")
S> et sswmb = Request.Form("ssWhatMadeBuy")
S> et sswba = Request.Form("ssWouldBuyAgain")
S> et sswbw = Request.Form("ssWouldBuyWhy")
S> et bbqfla = Request.Form("bbqFlavor")
S> et bbqsal = Request.Form("bbqsalt")
S> et bbqoi = Request.Form("bbqoil")
S> et bbqlta = Request.Form("bbqLikeTaste")
S> et bbqwta = Request.Form("bbqWhyTaste")
S> et bbqlte = Request.Form("bbqLikeTexture")
S> et bbqwte = Request.Form("bbqWhyTexture")
S> et bbqprp = Request.Form("bbqPricePaid")
S> et bbqprf = Request.Form("bbqPriceFeeling")
S> et bbqwmb = Request.Form("bbqWhatMadeBuy")
S> et bbqwba = Request.Form("bbqWouldBuyAgain")
S> et bbqwbw = Request.Form("bbqWouldBuyWhy")
S> et csfla = Request.Form("csFlavor")
S> et cssal = Request.Form("cssalt")
S> et csoi = Request.Form("csoil")
S> et cslta = Request.Form("csLikeTaste")
S> et cswta = Request.Form("csWhyTaste")
S> et cslte = Request.Form("csLikeTexture")
S> et cswte = Request.Form("csWhyTexture")
S> et csprp = Request.Form("csPricePaid")
S> et csprf = Request.Form("csPriceFeeling")
S> et cswmb = Request.Form("csWhatMadeBuy")
S> et cswba = Request.Form("csWouldBuyAgain")
S> et cswbw = Request.Form("csWouldBuyWhy")
S> et scofla = Request.Form("scoFlavor")
S> et scosal = Request.Form("scosalt")
S> et scoil = Request.Form("scooil")
S> et scolta = Request.Form("scoLikeTaste")
S> et scowta = Request.Form("scoWhyTaste")
S> et scolte = Request.Form("scoLikeTexture")
S> et scowte = Request.Form("scoWhyTexture")
S> et scoprp = Request.Form("scoPricePaid")
S> et scoprf = Request.Form("scoPriceFeeling")
S> et scowmb = Request.Form("scoWhatMadeBuy")
S> et scowba = Request.Form("scoWouldBuyAgain")
S> et scowbw = Request.Form("scoWouldBuyWhy")
	> IF oin <> "1" Then
	> 	oin = "0"
	> 	END IF
S> et connectionDSNtemp=Server.CreateObject("adodb.connection")
c> onnectionDSNtemp.ConnectionTimeout=60
c> onnectionDSNtemp.Open "dsn=kmc-mrk"
S> QL = "Insert INTO survey 
(> 
name,address,city,state,zip,phone,email,wherePurchased,purchased,ssflavor,
s> 
ssalt,ssoil,ssliketaste,sswhytaste,ssliketexture,sswhytexture,sspricepaid,
s> 
spricefeeling,sswhatmadebuy,sswouldbuyagain,sswouldbuywhy,bbqflavor,bbqsal
t> ,bbqoil,bbqliketaste,bbqwhytaste,bbqliketexture,bbqwhytexture,bbqpricepa
id
,> 
bbqpricefeeling,bbqwhatmadebuy,bbqwouldbuyagain,bbqwouldbuywhy,csflavor,cs
s> 
alt,csoil,csliketaste,cswhytaste,csliketexture,cswhytexture,cspricepaid,cs
p> 
ricefeeling,cswhatmadebuy,cswouldbuyagain,cswouldbuywhy,scoflavor,scosalt,
s> 
cooil,scoliketaste,scowhytaste,scoliketexture,scowhytexture,scopricepaid,s
c> opricefeeling,scowhatmadebuy,scowouldbuyagain,scowouldbuywhy) Values (" 
& 
o> nm & "','" & oad & "','" & ocy & "','" & ost & "','" & ozp & "','" & 
oph 
&>  "','" & oem & "','" & whp & "','" & pur & "','" & ssfla & "','" & 
sssal 
&>  "','" & sssoi & "','" & sslta & "','" & sswta & "','" & sslte & "','" 
& 
s> swte & "','" & ssprp & "','" & ssprf & "','" & sswmb & "','" & sswba 
&>  "','" & sswbw & "','" & bbqfla & "','" & bbqsal & "','" & bbqoi 
& "','" 
&>  bbqlta & "','" & bbqwta & "','" & bbqlte & "','" & bbqwte & "','" & 
b> bqprp & "','" & bbqprf & "','" & bbqwmb & "','" & bbqwba & "','" & 
bbqwbw 
&>  "','" & csfla & "','" & cssal & "','" & csoi & "','" & cslta & "','" & 
c> swta & "','" & cslte & "','" & cswte & "','" & csprp & "','" & csprf 
&>  "','" & cswmb & "','" & cswba & "','" & cswbw & "','" & scofla & "','" 
& 
s> cosal & "','" & scoil & "','" & scolta & "','" & scowta & "','" & 
scolte 
&>  "','" & scowte & "','" & scoprp & "','" & scoprf & "','" & scowmb 
&>  "','" & scowba & "','" & scowbw & ")"
c> onnectionDSNtemp.Execute(SQL)
O> PTIN = "Insert INTO permmktg 
(> oname,oaddress,ocity,ostate,ozip,ophone,oemail,oin) Values ('" & onm 
&>  "','" & oad & "','" & ocy & "','" & ost & "','" & ozp & "','" & oph 
&>  "','" & oem & "','" & oin & "')"
O> PTOUT = "Insert INTO permout 
(> nname,naddress,ncity,nstate,nzip,nphone,nemail,nin) Values ('" & onm 
&>  "','" & oad & "','" & ocy & "','" & ost & "','" & ozp & "','" & oph 
&>  "','" & oem & "','" & oin & "')"
I> F oin = "1" then 
c> onnectionDSNtemp.Execute(OPTIN)
c> onnectionDSNtemp.Close
E> ND IF
I> F oin = "0" then
c> onnectionDSNtemp.Execute(OPTOUT)
c> onnectionDSNtemp.Close
E> ND IF
S> et connectionDSNtemp=Nothing
R> esponse.Redirect "../../Survey-thanks.asp"
%> >

> 
A> ny thoughts????  Help is much appreciated!!!

> Troy
Message #5 by "Ken Schaefer" <ken@a...> on Thu, 27 Feb 2003 11:31:56 +1100
www.adopenstatic.com/faq/80040e14.asp
should give you the answer. Somewhere along the line your SQL statement is
malformed.

You can Response.Write() the SQL statement to the screen:

Response.Write(strSQL)
Response.End

and paste it into the Access Query Building (Queries -> New Query -> Design
View -> SQL), and attempt to run it. It should highlight where the problem
is.

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Troy Wise" <passlake@h...>
Subject: [access_asp] How many variables can a form pass to Access?


: I have a 59-variable survey that chokes.  I define all variables, then try
: to pass them, but I get the following error:
:
:
: Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
:
: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator)
: in query
: expression
'sdfg','sdfg','sdfg','AL','343','3434','troy@k...','asf
: g','Yes','Flavor was just right','Saltiness was just right','Chip was just
: right','Yes'.
:
: /admin/admin/survey_first_add.asp, line 67


  Return to Index