0
<%@ language="vbscript" %>
<html>
<body>
<P>
<%

dim adOpenDynamic,adLockOptimistic,adCmdtext

adOpenDynamic=0

adLockoptimistic=1

adCmdtext=2
dim i
i=1
dim conn,rs,strsql
dim fname,lname,gender,month,date,year,uname,pwd,email


set conn=Server.Createobject("ADODB.Connection")
set rs=Server.Createobject("ADODB.Recordset")

conn.ConnectionString="Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=myshoppe;Data Source=NVC-10\SQLEXPRESS"

conn.Open

fname=Request.Form("first_name")
lname=Request.Form("last_name")
gender=Request.Form("gender")
'month=Request.Form("Month")
'date=Request.Form("date")
'year=Request.Form("year")
email=Request.Form("email")
uname=Request.Form("user_name")
pwd=Request.Form("pwd")

strsql = "INSERT INTO user_info(fname, lname, gender, email, uname, pwd) VALUES(' " & fname & "',' " & lname &"',' " & gender & "',  "& email & "',' " & uname & "',' " & pwd & "')"                                                                

conn.Execute (strsql)
Response.Write("submitted<>")

Response.Write "Connected OK"


%>
<br>


</P>

</body>
</html>

Microsoft OLE DB Provider for SQL Server (0x80040E09) INSERT permission denied on object 'user_info', database 'myshoppe', schema 'dbo'.

1
  • Integrated Security=SSPI will mean that your script may be running as either ASPNET, IIS_IUSR or IIS_WPG user. Check to see if the user has correct privileges in SQL Server. Otherwise, if it's the wrong user, you may choose to change the user your ASP is run after. Commented Feb 5, 2012 at 9:32

1 Answer 1

1

You need an opening single quote before your email variable.

Sign up to request clarification or add additional context in comments.

2 Comments

i got that error bt after that i got another error. i edited my question
The user you are using to connect to the database does not have permission to insert. You need to get that user more access to the database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.