Update Records Syntax Question 
Author Message
 Update Records Syntax Question

Hi,

Am using VB 6.0 & webclasses to develop an application, i would like to know
the syntax for updating records in an access DB, the code that i use is from
a scripted page and when i try to use it i get all sorts of syntax errors,
couls someone help me re-arrange the code so it will work in the VB 6 IDE?

Sean

'----------------------------------------
code ----------------------------------

<%

  Dim SQLStmt

     rid = Request("rid")
     shooter = Replace(Request("shooter"), "'", "")
     shooterdesc = Replace(Request("shooterdesc"), "'", "")
     shooterprice = Replace(Request("shooterprice"), "'", "")

  Set Connection = Server.CreateObject("ADODB.Connection")
  Connection.open "arizona"

  SQLStmt = "UPDATE shooters66 SET shooter= '" & shooter& "', "
  SQLStmt = SQLStmt & "shooterdesc= '" & shooterdesc& "', "
  SQLStmt = SQLStmt & "shooterprice = " & shooterprice& " "
  SQLStmt = SQLStmt & "WHERE shooters66.rid = " & rid& " "

  Set RS = Connection.Execute(SQLStmt)

 Connection.close
 set Connection = nothing

  %>



Mon, 09 Jun 2003 07:50:29 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Syntax Question - Update Statements in webclasses

2. Syntax Question for update statement

3. question re getting updated record count

4. Newbie Question about updating records

5. Access VBA Question: Save Record info on update event

6. Question about updating record in text file using DAO

7. newbie question : tables are only updated after changing records

8. Question about updating record in text file using DAO

9. Questions about updating a database record.

10. Newbie Database record update question

11. Question re updating status of a single record

12. Updating a single OLE link for a record OR updating existing database

 

 
Powered by phpBB® Forum Software