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

  • SEARCH
  • Home
  • 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 7617443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:09:05+00:00 2026-05-31T03:09:05+00:00

I just re did my question and added a few other scripts needed to

  • 0

I just re did my question and added a few other scripts needed to pull everything together

This is the small script I am using to receive the post and push the data into the SQL Server (2008 if that matters):
UPDATE 2 after suggestions:

<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim myConn As SqlConnection = New SqlConnection("Integrated Security=false;Data Source=.;Initial Catalog=DOMAIN_NAME;UserID=user;Password=password")
myConn.Open()
Dim sqlstring As String = " INSERT INTO sean.local (etype, latitude, longtitude, phone) VALUES ('" + Request.Form("type") + "','" + Request.Form("latitude") + "','" + Request.Form("longtitude") + "','" + Request.Form("phone") + "')"
Dim cmd As SqlCommand = New SqlCommand(sqlstring, myConn)
cmd.ExecuteNonQuery()
myConn.Close()
Response.Redirect(Request.RawUrl, True)
Response.Write("1 record added")
End Sub
</script>

here is my create table script

CREATE TABLE local
(
P_Id int PRIMARY KEY IDENTITY,
etype varchar(255) NOT NULL,
latitude varchar(255),
longtitude varchar(255),
phone varchar(255)
)

and here is the form I am using to test

 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>A Web Page</title>
 </head>
 <body>
 <BR></BR>
 <form action="http://www.mydomain.com/script.asp" method="post">
 <h1>Form Test</h1>
 Phone:<BR></BR><input type="text" name="phone"/>      
 <BR></BR>
 type:<BR></BR><input type="text" name="type"/>
 <BR></BR>
 lat:<BR></BR><input type="text" name="latitude"/>
 <BR></BR>
 lng:<BR></BR><input type="text" name="longtitude"/>
 <BR></BR>
 <input type="submit" name="submit" value="Submit Data"/>
 </form>
 </body>
 </html>

It might be something small but I really have no other ideas…thank you.

  • 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-31T03:09:07+00:00Added an answer on May 31, 2026 at 3:09 am

    It’s mostly VB, just switch to it

    <%@ Page Language="VB" %>
    <%@ Import Namespace="System.Data.SqlClient" %>
    <script runat="server">
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim myConn As SqlConnection = New SqlConnection("Integrated Security=false;Data Source=.;Initial Catalog=DOMAIN_NAME;UserID=abc;Password=123")
            myConn.Open()
            Dim sqlstring As String = " INSERT INTO sean.local (etype, latitude, longtitude, phone) VALUES ('" + Request.Form("type") + "','" + Request.Form("latitude") + "','" + Request.Form("longtitude") + "','" + Request.Form("phone") + "')"
            Dim cmd As SqlCommand = New SqlCommand(sqlstring, myConn)
            cmd.ExecuteNonQuery()
            myConn.Close()
            Response.Redirect(Request.RawUrl, True)
            Response.Write("1 record added")
        End Sub
    </script>
    

    If you need it in C#, run it through this: http://wiki.sharpdevelop.net/Code%20Converter.ashx

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

Sidebar

Related Questions

I just did a fresh install of Apache server 2.2. Everything works. When I
This seems very foolish mistake, I just did a git stash pop on a
This is going to be a really dumb question, I just know it, but
This question is related to UITableView issue when using separate delegate/dataSource , though I
Apologies if this is somewhat of a duplicate question, I did see others but
I know that this question is being asked before but I did not get
First i've asked this question: Can a system app be updated? I did a
I just did something dumb with my SVN repository, I accidentally imported a load
I just did an svn merge from a branch to a trunk in my
I just did File -> New Project last night on a new project. Ah,

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.