Operation must use an updateable query? Works on

Results 1 to 4 of 4

Thread: Operation must use an updateable query? Works on

  1. #1
    Join Date
    Dec 1969
    Posts
    206

    Default Operation must use an updateable query? Works on

    Operation must use an updateable query. This is the error I get out on a server I use for my asp. How can I get around it? I am using the following code to insert information into a table.<BR><BR>Dim Connect, ChangeRS, Query<BR>Set Connect = Server.CreateObject("ADODB.Connection")<BR>Connect .Open "heritage"<BR><BR>Set ChangeRS = Server.CreateObject("ADODB.Recordset")<BR>Query = "Insert into items (custnumber, itemnumber, quantity, quantitynumber, price, description) Values (&#039"&sessionid&"&#039, &#039"&code&"&#039, &#039"&quantity&"&#039, &#039"&pricebreak&"&#039, &#039"&costreal&"&#039, &#039"&description&"&#039)"<BR>ChangeRS.Open Query, Connect, adOpenStatic, adLockOptimistic<BR><BR>I would appreciate any advice or help,<BR><BR>Thanks,<BR><BR>Brandon<BR><BR>

  2. #2
    John Weeflaar Guest

    Default RE: Operation must use an updateable query? Works

    What are the data types for: quantity, quantitynumber, price<BR>etc? Let us know.<BR>(Also, don&#039t forget to include "adovbs.inc" file).<BR><BR>John

  3. #3
    Join Date
    Dec 1969
    Posts
    206

    Default Data Types

    The data types are as follows:<BR>custnumber = number (like nine digits)<BR>itemnumber = text (numbers and letters)<BR>description = text (all text)<BR>quantity = number (length depends on amount of order)<BR>quantitynumber = number (from 1 - 200 )<BR>price = number (formated currency)<BR><BR>I did include adovbs.inc. I appreciate your help.<BR><BR>Brandon

  4. #4
    John Weeflaar Guest

    Default RE: Data Types

    I assume you write the query in one line. See if this will<BR>work or not:<BR><BR>Dim Connect, Query<BR>Set Connect = Server.CreateObject("ADODB.Connection")<BR>Connect .Open "heritage"<BR><BR>Query = "Insert into items (custnumber, itemnumber, quantity, quantitynumber, price, description) Values (" & sessionid & ", &#039" & code & "&#039, " & quantity & ", " & pricebreak & ", <BR>" & costreal & ", &#039" & description & "&#039)"<BR><BR>Connect.Execute(Query)<BR><BR> Hope it helps.<BR><BR>John


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •