Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · ASP.NET Newsletter Application · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : ASP : ADO/ODBC : data insertion problem Signup · Login
Author Thread
data insertion problem
Posted in tutorial: Adding records to the database with ASP
·  savitha17
User
Joined: 13 Jun 2006
Total Posts: 2

data insertion problem

Posted: 14 Jun 2006
Hi!
I'm using Asp, javaScript and sql server for my project.
I have a registration form which i have divided into two

the first form i have the following feiled:

1. Name
2. Company Name
3. Login ID
4. Password
5. Confirm Password
6. button which take to the next form

In the second Form

7. state
8. StAddress
9. Email
10. Phone
11. fax
12. Profile
13. Photo

submit button
in this form i inserting the data with the following code

<%
set Con= server.CreateObject("ADODB.connection")
Con.open "dsn=dsncon;uid=;pwd=;database=eaplindiadb"



qry="insert into DealerRegDetails(cName,cCompanyName,vlogiID,vPassword,vTurnOver,cState,cCity,StAdd,Email,nPhone,nfax,profile,Photo) values('" & trim(request("hName")) &"','" & trim(request("hCName")) &"','" & trim(request("hloginID")) &"','" & trim(request("hCPass")) &"','" & trim(request("hturnover")) &"','" & trim(request("lstState")) &"','" & trim(request("txtCity")) &"','" & trim(request("txtStreetAdd")) &"','" & trim(request("txtEmail")) &"','" & trim(request("txtPhone")) &"','" & trim(request("txtFax")) &"','" & trim(request("fUpload")) &"','" & trim(request("photo")) &"')"

Con.Execute qry

Con.close
%>
Now the problem is that, when i go form first form to second a empty record is inerted and when i fill the second form and click submit data is entered.
but i am not understanding why is empty record inserted when i come to the second form.

Please help e with this.
waiting for ur prompt reply

truly
savitha
Want to leave a comment? Login or Register for free!

Users Who Have Visited This Thread In Last 24 Hours
2 Visitors

Login to post a comment or start a new thread
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2010 Stardeveloper.com, All Rights Reserved.