ryan0926 Posted December 27, 2006 Share Posted December 27, 2006 hi Im using w2k3 server and sql server 2005. I followed the w3chools asp tutorial up to ADO.. when I'm trying to insert a new record to a table from a form the page would show no update permission.I did tried to add IUSR_servername to my database with full control etc. then I created a sql login to sql server. I can perform select statement from database and show it to page.. but i cant insert a record. the error keeps on showing the no update permission. meaning I have an error on it please help. this is the code.<html><body><%dim connSet conn = CreateObject("ADODB.Connection") conn.Mode = 3 ' adModeReadWrite conn.Open "DSN=gtks;uid=test;pwd=test;"If conn.errors.count = 0 ThenResponse.Write ("Connected OK " & "<br />" & "<br />")End Ifsql="INSERT INTO ct_mstr (CT-NBR,CT-FNAME)"sql=sql & " VALUES "sql=sql & "('" & Request.Form("nbr") & "'"sql=sql & "'" & Request.Form("fname") & ")"on error resume nextconn.Execute sql,recaffectedif err<>0 then Response.Write("check No update permissions!")else Response.Write("<h3>" & recaffected & " record added</h3>")end ifconn.close%></body></html>did i missed something to configure?tnx in advance.. Link to comment Share on other sites More sharing options...
ryan0926 Posted December 27, 2006 Author Share Posted December 27, 2006 SOLVED my problem. hehehe I should allow nulls on my fields anyway. tnx Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now