Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Professional
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 9th, 2012, 08:35 AM
Registered User
 
Join Date: Jan 2012
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default Is it possible to re-enter form values from second table?

In (asp classic) i have a form(one), a user access it by login-- then some values are pre-filled by session variables --- after that if user selects [add contacts] from add button then from pop up window he chooses one contact from contacts list ,,,is it possible to refill these values to form(a). I think I have cleared my point.

I did this in that way….
As user is logged in on form(one) he selects one contact from pop up window
And if I populate these values to form(two) its working fine, and if I cut query from form(two) and paste to form(one) it gives error.

So after putting query in form(one) when user clicks on send package,,,,,, page generate error, Because query is trying to find requested contacts_id and that’s why page generate error..
I don’t know how to resolve this.
And the error is
Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression 'contacts_id='.

For more understanding……….
Login page>>member area>>send package>>form(one)—select contacts---if successful it goes to form(one) other wise it generates error.

In member area page -send package- link is open by this…
<a href="send_package.asp?client_id=<%=session("mem_i d")%>">Send Package</a>
so logically it is working fine,,, until I paste query from form(two)…

I am new to asp so that’s why I need help,,, thanks to all :)
 
Old January 9th, 2012, 08:43 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Looks like an error in your SQL statement. Can you post the code that builds up the SQL statement, along with the final SQL statement before it gets sent to the database?

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old January 9th, 2012, 09:37 AM
Registered User
 
Join Date: Jan 2012
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default

In member area -send_package.asp- is open by this at the moment i m not inserting query…
Code:
<a href="send_package.asp?client_id=<%=session("mem_id")%>">Send Package</a>
send_package.asp contains form with in a html table
suppose it has 6 values 3 are filled by session variables and other 3 by user selection
from contacts

and i used this query to chk on form(two) on seperate pg and it works fine
Code:
<%
contacts_id=request("contacts_id")
Set rs1 = Server.CreateObject("ADODB.Recordset")
sql1 = "select * from add_contacts where contacts_id="&contacts_id&"" 
rs1.Open sql1, conn
While Not rs1.EOF
%>
some html....
<%
rs1.MoveNext
Wend
%>
and when i put this on send_package.asp then this pg generate errors
 
Old January 9th, 2012, 09:53 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
and i used this query to chk on form(two) on seperate pg and it works fine
It would be better if you posted the code that *doesn't* work.

Also, use Response.Write to write out the problematic SQL statement and post it here. I think your statement is wrong somehow because of missing values.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Open a form to enter a new record dstein4d Access VBA 1 August 17th, 2007 12:36 PM
How to enter <...,1> values into table. RaCheer SQL Language 1 February 5th, 2006 11:59 PM
JSP form values to Oracle table (Insert) gokul_blr JSP Basics 1 August 17th, 2004 12:59 AM
Access update table from form values trevander Access VBA 2 April 28th, 2004 03:06 PM
thousands records enter one table to another table mateenmohd SQL Server 2000 3 July 17th, 2003 07:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.