Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ASP problem, please help me !

Posted on 1998-12-26
17
Medium Priority
?
157 Views
Last Modified: 2010-04-09
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
0
Comment
Question by:nicjac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
  • 3
  • +2
17 Comments
 
LVL 10

Expert Comment

by:MasseyM
ID: 1841013
will you please email me the database and you asp page?  I will take a look and let you know.
0
 

Expert Comment

by:thorner
ID: 1841014
What are the fields defined as? Text, Number, Etc....?
0
 

Author Comment

by:nicjac
ID: 1841015
This is Text definied Fileds

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Expert Comment

by:thorner
ID: 1841016
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
 

Author Comment

by:nicjac
ID: 1841017
That do not work... can I send my DB and the ASP page to anyone ? PLease !!!!! ;)

Nic
0
 

Expert Comment

by:thorner
ID: 1841018
Send it to me.  I'll fix it right up.  Send me a copy of the db also.  thorner@bsa3.kent.edu
0
 

Author Comment

by:nicjac
ID: 1841019
I have receive nothing on answer of my mails.... please answer me !! This is very important

Nic
0
 
LVL 2

Expert Comment

by:vendrig
ID: 1841020
Are you using any special characters as value for the auteur variable, when you're testing? Like accent aigu or quotes or so.
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1841021
I am almost finished with the ASP.  I will send it back sometime today.
0
 
LVL 6

Expert Comment

by:PBall
ID: 1841022
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
 
LVL 10

Accepted Solution

by:
MasseyM earned 800 total points
ID: 1841023
I sent you the completed ASP file.  All is well now.  Please review the ASP and grade the answer.
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1841024
nicjak, I am still writing the survey.   I will send it to you when complete.  You have an email address?
0
 

Author Comment

by:nicjac
ID: 1841025
I need no more a Survey
I want a Search Engine now :)
I can't do that
Help me !

Nic
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1841026
No problem.  Do you want to search a database or all the files on your web?
0
 

Author Comment

by:nicjac
ID: 1841027
I want to search a database :)

Nic
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1841028
Give me your e-mail.  I'll send it to you at the end of the weekend.
0
 

Author Comment

by:nicjac
ID: 1841029
nicjac@deckpoint.ch
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question