Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4552168
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:44:33+00:00 2026-05-21T16:44:33+00:00

Below is my simple asp code that I am using to insert some data

  • 0

Below is my simple asp code that I am using to insert some data to the SQL Server database. It gives the below error. Could someone please have a look and let me know the error with this code?

<html>
    <head>
        <title>Address Book Insertion</title>
    </head>
    <body>
<%

    set connection=Server.CreateObject("ADODB.Connection")
    connection.Open "Provider=SQLOLEDB;Server=charithj-pc;Integrated Security=SSPI;Initial Catalog=AddressDB;"

    cmd =       "INSERT INTO AddressBook (FirstName, Surname, Address) VALUES ('"
    cmd = cmd & Request("FirstName") & "','"
    cmd = cmd & Request("Surname")   & "','" 
    cmd = cmd & Request("Address")   & "')"

    Response.Write(cmd)

    on error resume next
    connection.Execute cmd
    if err <> 0 then
        Response.Write("Insertion failed")
    else 
        Response.Write("Insertion successful")
    end if
    connection.close
%>
    </body>
</html>

The website cannot display the page

HTTP 500

Most likely causes:

•The website is under maintenance.

•The website has a programming error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T16:44:34+00:00Added an answer on May 21, 2026 at 4:44 pm

    go in your browser, i assume it’s internet explorer and disable “show friendly http errors”. this helps you to see the real error message.

    btw. your code allows sql injection. use sql parameters or replace some characters like single quote etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple form with some plain html input like bellow using ASP.NET
I'm trying to do something that sounds fairly simple using ASP.NET 3.5. A user
Below is the code of a simple html with a table layout. In FF
I need a simple SQL to accomplish the below: Problem: When a petrol bunk
I'm making a simple Image Debugger Visualizer. Code is below. I'm not sure if
The code below shows a sample that I've used recently to explain the different
The simple demo below captures what I am trying to do. In the real
Below I have a very simple example of what I'm trying to do. I
Below is sample code to create a radio button element with Yes/No options in
In the below code sample, what does {0:X2} mean? This is from the reflection

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.