Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2006
    Location
    Athens - Greece
    Posts
    22

    Unhappy Unanswered: Can't INSERT into database's table !

    Hi everyone !!!
    The past two days I am trying to make a survey to work !
    Unfortunately I haven't accomplised yet :-(

    So this is my problem...
    I am using ASP, MS-SQL for the survey.
    When I take the survey for the first time evetything is working and the fields are inserted correctly in the table !
    If I take the survey for the second time... there is no insert in the table !!!

    This is code...
    Code:
    dim Rs_Qu
          set Rs_Qu = myCon.Execute("Select * From QUESTION ")
          if Rs_Qu.Eof then
             myCon.Execute ("Insert into QUESTION (" & SqlStr_1 & ") values (" & SqlStr_2 & ")")
    Also, I must tell you that when I use the SQL Pane and do ...
    Code:
    Insert into QUESTION (" & SqlStr_1 & ") values (" & SqlStr_2 & ")
    replacing of course " & SqlStr_1 & " and " & SqlStr_2 & "
    i can insert the entry !!!

    Please help !

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    OK, I'm no VB expert, but after you insert a record isn't the EOF no longer satisfied upon opening the recordset? Shouldn't you have a command to move to the end of the recordset?
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Aug 2006
    Location
    Athens - Greece
    Posts
    22
    Thanks mate !
    It worked !!!
    Visit...
    http://kanenas.net
    News and Ideas about programming

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •