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

    Join Date
    Jun 2003
    Posts
    4
    Rep Power
    0

    Question Action .asp from HTM


    I'm trying to connect to a sql server to write a record , but am getting no results.
    See the attched file

    Thanks
    Attached Files
  2. #2
  3. Digitally Challenged
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    280
    Rep Power
    12

    try this


    have you tried using an INSERT sql statement to put the items into the database?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    4
    Rep Power
    0

    Thank you for your reply.


    Have you see the zip. attached file because I dont know how to use the insert SQL statment in the .asp file
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    4
    Rep Power
    0

    Thank you for reply


    Have you see the zip. attached file because I dont know how to use the insert SQL statment in the .asp file
  8. #5
  9. Digitally Challenged
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    280
    Rep Power
    12
    ok here is an sql insert statement

    INSERT INTO [tablename] (columnname1, columnname2, columnname3, columnname4, columnname5) VALUES (value1, value2, value3, value4, value5)

    now if you are using those request.form variables, it might look like this (its an abreviated version but you should get the idea)

    sqlstatement = "INSERT INTO [tablename] (columnname1, columnname2) VALUES (" & request.form("value1") & ", " & request.form("value2") & ")"

    the above works for numbers now lets do it with strings

    sqlstatement = "INSERT INTO [tablename] (columnname1, columnname2) VALUES ('" & request.form("value1") & "', '" & request.form("value2") & "')"

    the things that look like "' are a double quote " and then a single quote ' or vice versa, you can kind of see it

IMN logo majestic logo threadwatch logo seochat tools logo