Signup
·
Login
Stardeveloper.com
Home
·
Tutorials
·
Forums
·
Web Hosting Plans
·
Faisal Khan's Blog
·
Contact
Forums
:
ASP
:
ADO/ODBC
:
Problem with Inserting Data in ASP
Signup
·
Login
New Thread
Go To Page:
1
Author
Thread
Problem with Inserting Data in ASP
Posted in tutorial:
Inserting Form content into Database with ASP
·
nabeel92
Joined: 21 Jan 2005
Total Posts: 1
Problem with Inserting Data in ASP
Posted: 21 Jan 2005
Can Anybody Please tell me whats wrong with this code.It Ain't working.DB is Access.
<%
var1 = request.querystring("1")
var2 = request.querystring("2")
set cn = server.createobject("ADODB.Connection")
set rs = server.createobject("ADODB.RecordSet")
rs.locktype = 3
stat = "insert into tbl1 (id,name) values ('" & var1 & "', '" & var2 & "')"
cn.open "Provider=Microsoft.jet.oledb.4.0; data source= " & server.mappath("db1.mdb")
cn.execute(stat)
rs.update
%>
·
Faisal Khan
Joined: 24 Sep 2002
Total Posts: 547
Re: Problem with Inserting Data in ASP
Posted: 29 Jun 2007
Why are you creating a 'RecordSet' object? For INSERT, UPDATE and DELETE SQL statements, you don't need a RecordSet object.
Remove all references to RecordSet, and try again.
Faisal Khan
.
Stardeveloper.com
Previous Thread
::
Next Thread
Go To Page:
1
Users Who Have Visited This Thread In Last 24 Hours
6 Visitors
Login
UserName Or Email Address:
Password:
Auto-Login:
·
Create New User Account
·
Send Forgotten Password by Email
© 1999 - 2009 Stardeveloper.com, All Rights Reserved.