📄 forum_mssql.sql
字号:
-- Copyright (C) 2001 YesSoftware. All rights reserved.
-- Forum_MSSQL.sql
if exists (select * from sysobjects where id = object_id(N'messages') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table messages
GO
create table messages
(
message_id integer IDENTITY primary key,
message_parent_id integer,
topic varchar(50),
author varchar(50),
message text,
date_entered datetime
)
GO
insert into messages(message_parent_id, topic, author, date_entered, message)
values(null, 'error message!!! in DB MSG', 'seopo', '2001-01-04 11:28:41', 'I have a problem in DB MSG at brinkster
It is in a SQL statement...
''select * from tablename''--> It is well operated...
But ''delete from tablename'' or ''update set No =1 where No=3...etc''----> It is not well operated....
There appears error message
It is.....
Query Results
ADODB.Recordset error ''800a0e78''
Operation is not allowed when the object is closed.
/DatabaseManager.asp, line 473 ""
I want to find a way...
please! give me an answer....')
GO
insert into messages(message_parent_id, topic, author, date_entered, message)
values( 1, 'RE: error message!!! in DB MSG', 'nhsa', '2001-01-04 15:00:42',
'DELETE * FROM tablename WHERE stringfield=''stringvalue''
UPDATE tablename SET stringfield=''hello'' WHERE numberfield=10
HTH
Nige - nhsa@yahoo.com')
GO
insert into messages(message_parent_id, topic, author, date_entered, message)
values(1, 'RE: error message!!! in DB MSG', 'hiflyer', '2001-01-05 4:28:13',
'Nige is right with his SQL string examples, but the error you are getting is because you are trying to perform operations on a recordset which has been closed. If you look at your code you will probably find a line such as dbConn.close, or RS.close or Set RS = nothing somewhere before line 473.
HTH,
Bod.
www5.brinkster.com/hiflyer')
GO
insert into messages(message_parent_id, topic, author, date_entered, message)
values(null, 'writing db results to multiple pages', 'shiaislamasp', '2001-01-04 19:56:52', 'how do i write say 10 db results, from a select statement, on a page, then link to another page, with the next 10, and so on..
I would be very grateful for any help
Thank you')
GO
insert into messages(message_parent_id, topic, author, date_entered, message)
values( 4, 'RE: writing db results to multiple pages', 'adom', '2001-01-05 3:33:07', 'Asuming your database is sorted by a incrementing value you can use the BETWEEN statement in your querry.
That is on the first page you do:
SELECT * from Table WHERE OrderValue BETWEEN 1 and 10
Then you pass along the last value to the next page ""show_rewults?start=11"" for example and go from there
SELECT * from Table WHERE OrderValue BETWEEN 11 and 20
and so on
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -