-
INSERT INTO - form and variable in ASP page
Hi all,
I have this code:
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "data"
sql = "SELECT * FROM kong"
Set RS = Conn.Execute(sql)
Conn.Execute(sql)
dim i, prod_name,
prod_name = Request.Form ("prod_name")
if prod_name = "ALTEA" then
i = RS("d_al_s")
elseif prod_name= "AMULET" then
i = RS("d_al_w")
end if
%>
where prod_name is name of form on previous ASP page and "i" is variable.
I need put this data (prod_name, i)in database, but I don´t know how write
this code:
"INSERT INTO kong (prod_name, discount) VALUES ('"& Request.Form ("prod_name")
& "','" ....... & "')"
where ...... is place for variable "i".
Do you understand me?
I´m sorry, but my Englis is very bad.
Thank for your help.
Milan
-
Re: INSERT INTO - form and variable in ASP page
I´m stupid - this is OK.
"INSERT INTO kong (prod_name, discount) VALUES ('"& Request.Form ("prod_name")
& "',' " & i &"')"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks