#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    4
    Rep Power
    0

    ASP with SQL insert statements


    Hi people,

    I'm new to ASP and have a problem which I hope you can help me with.

    Question 1: How can have th asp script automatically convert the date generated by the system to a format which is acceptable by Sybase SQL (yyyymmdd)


    Question 2: If the user were to insert a a string containing " ' ", how can I convert it into a special character so that it won't be treated by Sybase SQL as the start/end of a variable?


    I would really appreciate it if anyone could spare me some advice.



    Regards,
    Neoxy
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    9
    Rep Power
    0

    Re: ASP with SQL insert statements


    Originally posted by Neoxy
    Question 1: How can have th asp script automatically convert the date generated by the system to a format which is acceptable by Sybase SQL (yyyymmdd)
    Try this site. It's been a HUGE help to me. This link answers your specific question.

    DevGuru


    Originally posted by Neoxy
    Question 2: If the user were to insert a a string containing " ' ", how can I convert it into a special character so that it won't be treated by Sybase SQL as the start/end of a variable?
    This link (same site) uses the replace function. Just select your 'special character' carefully.

    Hope This Helps ~ Dave
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    4
    Rep Power
    0
    Thanks Dave !!!

IMN logo majestic logo threadwatch logo seochat tools logo