Wrox Programmer Forums
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language 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 October 23rd, 2007, 03:24 AM
Registered User
 
Join Date: Oct 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help Me Out

Dear Brother



When i submit the data to database i get an internal server error . i am write the following code in my submit.asp file for entering data in database . if u please check this code and remove any error i am very thankful to all of u.





<%
dim exhibition , cname ,caddress , ccity , ccountry , cperson , cdesignation , ctelephone , ccellphone , cemail , cfax , cweb , cproduct ,carea ,data_conn,query_sql,rec_exe



' getting values from previous form page



exhibition = Request.form("exhibition")

cname = Request.form("cname")

caddress = Request.form("caddress")

ccity = Request.form("ccity")

ccountry = Request.form("ccountry")

cperson = Request.form("cperson")



cdesignation = Request.form("cdesignation")

ctelephone = Request.form("ctelephone")

cmobile = Request.form("cmobile")

cemail = Request.form("cemail")

cfax = Request.form("cfax")

cweb = Request.form("cweb")

cproduct = Request.form("cproduct")

carea = Request.form("carea")



'Creating Data Connection



Set data_conn=Server.CreateObject("ADODB.Connection")

data_conn.ConnectionString ="DSN=booking"

data_conn.Open



'Create Data Entry command



query_sql="INSERT INTO booking(Exhibition,CompanyName,Address,City,Countr y,ContactPerson,Designation,Telephone,Cell,Email,F ax,Web,Product,Area)



VALUES('"&request.form("exhibition")&"' , '"&request.form("cname")& "' , '"&request.form("caddress")&"' , '"&request.form("ccity")&"' , '"&request.form("ccountry")&"' , '"&request.form("cperson")&"' , '"&request.form("cdesignation")&"' , "&request.form("ctelephone")&" , "&request.form("cmobile")&" , '"&request.form("cemail")&"' , "&request.form("cfax")&",'"&request.form("cweb")&" ','"&request.form("cproduct")&"','"&request.form(" carea")&"')"

Set rec_exe=data_conn.execute(query_sql)
%>



 
Old October 24th, 2007, 06:31 PM
Authorized User
 
Join Date: Sep 2007
Posts: 56
Thanks: 0
Thanked 1 Time in 1 Post
Default

Try it without using the set command...

Set rec_exe=data_conn.execute(query_sql)
to
data_conn.execute(query_sql)

http://mynameissteve.com









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