Problem with long insert statement
Guys,
Though its somewhat simple problem i am stuck with it from ond and half days. I have to insert 55 values from a form to an access database. I created two strings and then joined them:
str4 = "insert into srx ename,email,cmpaddress,hmaddress,phhome,phwork,phm obile,dept,ssup,acadstatus,semester,year,major,awa rds,seminars,fcpr,afgp,afkb,afs,esa,esag,aceg,acep ,afaapt,ncsa,jsc,yc,ascm,afadvpt,aftrc,lgt,cprpr,c fa,aedess,lins,wsi,bbpt,lm,oadmin,linstr,wtrit,wtf rt,wprkt,stsc,cpo,padi,nadi,market,gd,pr,wpd) VALUES ('" + ename.Value + "','" + email.Value + "','" + cmpaddress.Value + "','" + hmaddress.Value + "','" + phhome.Value + "','" + phwork.Value + "','" + phmobile.Value + "','" + dept.Value + "','" + ssup.Value + "','" + acadstatus + "','" + semester.Value + "','" + year.Value + "','" + major.Value + "','" + awards.Value + "','" + seminars.Value + "','" + FCPR.Value + "','" + AFGP.Value + "','" + AFKB.Value + "','" + AFS.Value + "','" + ESA.Value + "','" + ESAG.Value + "','" + ACEG.Value + "','" + ACEP.Value + "','" + AFAAPT.Value + "','" + NCSA.Value + "','" + JSC.Value + "','" + YC.Value + "','" + ASCM.Value + "','" + AFADVPT.Value + "','" + AFTRC.Value + "' "
str5 = ",'" + LGT.Value + "','" + CPRPR.Value + "','" + CFA.Value + "','" + AEDESS.Value + "','" + LIns.Value + "','" + WSI.Value + "','" + BBPT.Value + "','" + Lm.Value + "','" + Oadmin.Value + "','" + LInstr.Value + "','" + WTRIT.Value + "','" + WTFRT.Value + "','" + WPRKT.Value + "','" + STSC.Value + "','" + CPO.Value + "','" + PADI.Value + "','" + NADI.Value + "','" + Market.Value + "','" + GD.Value + "','" + PR.Value + "','" + WPD.Value + "');"
str6 = str4 & str5
db.execute str6
I even displayed the whole query in message..its working absolutely fine.. i mean the syntax..i have checked it many times...just the values dont show up int the database
Any help from your side is most appreciated..Thanks in advance...
Vikrant
|