trouble inserting records to a DB

Results 1 to 4 of 4

Thread: trouble inserting records to a DB

  1. #1
    JOEL M Guest

    Default trouble inserting records to a DB

    so here I am learning ASP for the first time and I&#039m able to retrieve records with no problem, but then I get the bright idea, "hey, let me try to insert records using an HTML table" but that my friends is my dillema. The way that I&#039m tryin to do it is basically this, <BR>first gather the info from a regular ol&#039 html table, then submit it to the URL, then [on to the next page]<BR>&#060;note: not actual code (duh!)&#062;<BR>make the connection with the DB;<BR>set the query string to variables;<BR>insert the variables into the INSERT statement;<BR><BR>now is there any specific format or part that I&#039m missing? cuz I been up and down that code and can&#039t find any discrepancies.

  2. #2
    Aaron Eden Guest

    Default RE: trouble inserting records to a DB

    Are you getting an error when you insert the records? What DB are you using? What is the ACTUAL SQL statement?

  3. #3
    JOEL M Guest

    Default here it goes

    I&#039m using an access database on doesn&#039t specifically give an error message but just says that the page cannot be displayed. the sql statement runs about like this:<BR>&#060;!-------------------------------------------------------&#062;<BR>set sql = "INSERT INTO items (description, price)"<BR>sql = sql & "VALUES (&#039"&description&"&#039,&#039"&price&"&#039)"<B R>&#060;!-------------------------------------------------------&#062;<BR>I havent been able to find documentation on how exactly to implement this, wether you&#039ve gotta do something like:<BR>set item = conn.execute(sql)<BR>or what

  4. #4
    Join Date
    Dec 1969

    Default RE: here it goes

    I think you have to create a recordset and then use something like "set objRS=conn.execute(sql)" I&#039m relatively new to ASP myself, so I may have someting wrong. Good luck!

Posting Permissions

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