Problem
I originally used an MDB database, a system written in ASP.
Because there is no experience, the where field is used.
Recently, due to the need to guide the database into SQL, after the success of the guide. When I was debugging, I found that a lot of code using "Rs.update" would prompt for syntax errors near the where. Depressed I looked up a lot of information, but also I tried a long day. It was not until the afternoon that I finally affirmed that there was a problem with the where field.
The conclusion of debugging is to use the UPDATE statement, but it can not use Rs.update to realize the update, renamed Normal, but the amount of work is too large, delete normal, but not deleted. In a group of 7917375 and gas and other people to discuss a long time there is no good other way to. So sent here, I hope someone can help solve.
This time is not used, I have to trouble to replace can be replaced, and debugging again and again.
Here to remind you, in the form design, it is best not to use the database to preserve fields.
shown in SQL as automatically changed to [segment name], in MDB please forgive me for being stupid to see it.
================== attached debugging information
Sql:
if exists (SELECT * from dbo.sysobjects WHERE id = object_id (N ' [dbo].[ Test] ') and OBJECTPROPERTY (ID, N ' isusertable ') = 1)
drop table [dbo]. [Test]
Go
CREATE TABLE [dbo]. [Test] (
[ID] [bigint] IDENTITY (1, 1) is not NULL,
[WHERE] [Char] (a) COLLATE chinese_prc_ci_as NULL,
[Names] [Char] (a) COLLATE chinese_prc_ci_as NULL
) on [PRIMARY]
Go
The first time to guide such a script, hope to use.
Asp:
<% @LANGUAGE = "VBSCRIPT" codepage= "936"%>
<%
Connstr= "Driver={sql server};server=localhost;uid=sa;pwd=;d atabase=test"
Set Conn=server.createobject ("ADODB. Connection ")
Conn. Open ConnStr
Sql= "SELECT * from Test where id=1"
Set Rs=server.createobject ("Adodb.recordset")
Rs.Open sql,conn,1,3
RS ("names") = "Test"
Rs.update
Rs.close
Set rs=nothing
Set conn=nothing
%>