Solved

ASP insert in database problem

Posted on 2002-04-02
11
179 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Colabnet Subversion - move repository 6 49
Renaming file after uploading in Coldfusion 4 252
How to display HTML content in APEX 5.0? 5 135
Problem to get function 52 108
When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

832 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