User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 397,598 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,856 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting

Insert Request.Form result into SQL

Join Date: Mar 2007
Posts: 13
Reputation: roby4eldiablo is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
roby4eldiablo roby4eldiablo is offline Offline
Newbie Poster

Re: Insert Request.Form result into SQL

  #3  
Apr 5th, 2008
<% @LANGUAGE="JavaScript" %>
<!--#include file="adojavas.inc"-->
<%
var con;
var conString;
con = Server.CreateObject("ADODB.Connection");
conString = "Provider=Microsoft.Jet.OLEDB.4.0; "+ "Data Source= " + Server.MapPath("/public/booksDB.mdb");
con.Open(conString);
%>
<%
a=Request.Form("LastName");
b=Request.Form("FirstName");
c=Request.Form("Street");
d=Request.Form("City");
e=Request.Form("Country");
f=Request.Form("Phone");
Response.write (a+" "+b+" "+c+" "+d+" "+e+" "+f);
var sSQLString;
sSQLString = "INSERT INTO tAuthors (LastName, FirstName, Street, City, Country, Phone) VALUES (a,b,c,d,e,f);"
con.Execute(sSQLString);
%>
<%
con.Close( );
con = null;
%>

This is my full code for this asp-javascript page.
The problem with the code you suggest me is that it isn't Javascript like and I need Javascript.

I really appreciate your help, but if you can help me with a javascript like code I thank you for ever
Last edited by roby4eldiablo : Apr 5th, 2008 at 3:30 am.
Reply With Quote  
All times are GMT -4. The time now is 6:35 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC