Solved

ASP insert in database problem

Posted on 2002-04-02
11
180 Views
Last Modified: 2010-04-07
<html>

<head>
<title>CONNECT</title>
</head>

<body>
<%

Dim MyConn, RS, SQL

     Set MyConn=Server.CreateObject("ADODB.Connection")
     MyConn.Open "Journal"

     SQL = "insert into tabletest (test, new, num) values ('Faisal Khan', 'Adding Records',1)"
     
     MyConn.Execute SQL
     MyConn.close
     Set MyConn = Nothing
%>
</body>

</html>


With this piece of code a get an error that says :
This operation needs to use a query that could be updated.

Could someone help me please
0
Comment
Question by:deschenesp
  • 4
  • 3
  • 2
  • +2
11 Comments
 

Author Comment

by:deschenesp
ID: 6913565
I have to leave for now but will be checking often
thank's to all
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6915703
0
 
LVL 19

Accepted Solution

by:
cheekycj earned 34 total points
ID: 6915708
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

Author Comment

by:deschenesp
ID: 6919134
Thank's cheekycj,

      I'm gonna test your solution and I'll be back soon.
0
 
LVL 18

Expert Comment

by:bruno
ID: 6925428
i normally do it this way....gotta be careful of all the ' and " though...



testVal = Replace(Request.Form("test"),"'","''")
newVal = Replace(Request.Form("new"),"'","''")
numVal = Replace(Request.Form("num"),"'","''")


strSQL = "INSERT INTO tabletest (test, new, num) VALUES (" &_
         
     "'" & testVal & "', " &_
     "'" & newVal & "', " &_
     "'" & CInt(numVal) & "')"      
0
 

Expert Comment

by:SteveH012698
ID: 6936125
ASP Returns 'Operation Must Use an Updateable Query' Error (Q175168)

may be a permissions thing, check out:

http://support.microsoft.com/search/preview.aspx?scid=kb;en-us;Q175168
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6974097
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if they are still open in 14 days.  Experts, please post closing recommendations before that time.

Below are your open questions as of today.  Questions which have been inactive for 21 days or longer are considered to be abandoned and for those, your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and please keep them updated. If you are a KnowledgePro user, use the Power Search option to find them.  

Questions which are LOCKED with a Proposed Answer but do not help you, should be rejected with comments added.  When you grade the question less than an A, please comment as to why.  This helps all involved, as well as others who may access this item in the future.  PLEASE DO NOT AWARD POINTS TO ME.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20091543.html
http://www.experts-exchange.com/questions/Q.20133981.html
http://www.experts-exchange.com/questions/Q.20281787.html
http://www.experts-exchange.com/questions/Q.20284144.html



*****  E X P E R T S    P L E A S E  ******  Leave your closing recommendations.
If you are interested in the cleanup effort, please click this link
http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643 
POINTS FOR EXPERTS awaiting comments are listed in the link below
http://www.experts-exchange.com/commspt/Q.20277028.html
 
Moderators will finalize this question if in @14 days Asker has not responded.  This will be moved to the PAQ (Previously Asked Questions) at zero points, deleted or awarded.
 
Thanks everyone.
Moondancer
Moderator @ Experts Exchange
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6977844
IMHO, 3 way split.

CJ
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6977918
Thanks, CJ.
Points have been split.
Points for brunobear -> http://www.experts-exchange.com/jsp/qShow.jsp?qid=20294998
Points for SteveH -> http://www.experts-exchange.com/jsp/qShow.jsp?qid=20294999
Moondancer - EE Moderator
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6978607
Thank you.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6978933
Always my pleasure to help. :)
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question