ASP problem, please help me !

Big problem when I try to update an existing field with SQL.

      numero = request.querystring("numero")    

      auteur=Request.Form("auteur")
      news=Request.Form("news")
      titre=Request.Form("titre")
      heure=Request.Form("heure")
      sDate=Request.Form("sDate")
      images1=Request.Form("images1")
      images2=Request.Form("images2")
      images3=Request.Form("images3")
      images4=Request.Form("images4")
      images5=Request.Form("images5")
      images6=Request.Form("images6")

update1 = "UPDATE News SET auteur = "& auteur &", news = '"& news &"' ,titre = '"& titre &"', heure = '"& heure &"', date = '"& sDate &"', images1 = '"& images1 &"', images2 = "& images2 &", images3 = "& images3 &", images4 = "& images4 &", images5 = "& images5 &", images6 = "& images6 &" WHERE numero2 = "& numero &""


I don't know... i declare the variable.... it say me : the content of auteur is a missing operator or somthing like this.....
Please help me !!! 200 POINTS !!!!!!

Nic
nicjacAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
MasseyMConnect With a Mentor Commented:
I sent you the completed ASP file.  All is well now.  Please review the ASP and grade the answer.
0
 
MasseyMCommented:
will you please email me the database and you asp page?  I will take a look and let you know.
0
 
thornerCommented:
What are the fields defined as? Text, Number, Etc....?
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
nicjacAuthor Commented:
This is Text definied Fileds

0
 
thornerCommented:
Make sure that you have a single quote and then a double quote around each variable.  It looks like you might not have them. Something like this: "UPDATE News SET auteur = '" & auteur & "', news = '" & news & "', etc....    Only put the "'" around textfields, other fields such as Date/Time and Numbers don't need them.
0
 
nicjacAuthor Commented:
That do not work... can I send my DB and the ASP page to anyone ? PLease !!!!! ;)

Nic
0
 
thornerCommented:
Send it to me.  I'll fix it right up.  Send me a copy of the db also.  thorner@bsa3.kent.edu
0
 
nicjacAuthor Commented:
I have receive nothing on answer of my mails.... please answer me !! This is very important

Nic
0
 
vendrigCommented:
Are you using any special characters as value for the auteur variable, when you're testing? Like accent aigu or quotes or so.
0
 
MasseyMCommented:
I am almost finished with the ASP.  I will send it back sometime today.
0
 
PBallCommented:
It's good to run a request.form value thru somekind of a filter before finally committing it to the database.  One necessary filter that comes to mind when dealing with text field is the apostrophe to double apostrophes.

Author = Replace(Request.Form("Author"),"'","''")

Another field type that might need conversion is the datetime field.

Normally, if the form field itself already formatted correctly this will not matter, but since we can't really be sure about this, we might as well do a conversion ourself just to be cautious.

A simplest way to convert the date field is just to convert it using VBScript cDate function, althought this might not work all the time depending on the data entered.
PublishDate = cDate(Request.Form("PublishDate"))

I did my own conversion routine for datetime field that will generate a SQL friendly datetime string field.

i.e.  11/20/1998 to Nov 11 1998

Datetime input can be a pain in the butt sometimes.  I ended up coding an ASP/JavaScript Calendar control component to tackle this problem.  So far, it works for me.  I don't have to do any validation on the datetime field anymore :)

You can find the component at http://www.developer.com/directories/pages/dir.activeserverpages.components.commercialcomponents.miscellaneous.2.html

0
 
MasseyMCommented:
nicjak, I am still writing the survey.   I will send it to you when complete.  You have an email address?
0
 
nicjacAuthor Commented:
I need no more a Survey
I want a Search Engine now :)
I can't do that
Help me !

Nic
0
 
MasseyMCommented:
No problem.  Do you want to search a database or all the files on your web?
0
 
nicjacAuthor Commented:
I want to search a database :)

Nic
0
 
MasseyMCommented:
Give me your e-mail.  I'll send it to you at the end of the weekend.
0
 
nicjacAuthor Commented:
nicjac@deckpoint.ch
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.