Monthly Archives: June 2005

为dnn安装msde

1. 从msdn下载msde2000 release A(当前最新)
2. 将其解压缩到一个目录
3. 打开cmd,cd到此目录,运行 setup sapwd="xxx" datadir="d:sqldata"
3.1 查阅readme.htm文件有详细的setup参数介绍
4. 重启,msde自动运行。
5. list databases and then create database "hdss"
5.1 c:>osql -E -S wanwan
1> use master
2> go
1> select name from sysdatabases
2> go
1> create database hdss
2> go
5.2 list all tables in a database
1> select name from sysobjects where type = "S"
2> go
1> use hdss
2> go
1> select name from sysobjects where type = "U"
2> go
5.3 add user and grant access to the user
1> use master
2> exec sp_addlogin ‘hdss’, ‘hdss1234’, ‘hdss’
3> go
已创建新登录。
1> use hdss
2> exec sp_grantdbaccess ‘hdss’
3> go
已向 ‘hdss’ 授予数据库访问权。
1> use hdss
2> exec sp_addrolemember ‘db_owner’, ‘hdss’
5.4 list users and roles for a specific database
1> use hdss
2> select name from sysusers
3> go
6. 更改登录模式
HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSSQLServerMSSQLServer 将loginMode从1改成2(混合)

qt 4推出在windows平台下的GPL版

可惜不支持ms VC++或VC.net,网上已经有一些讨论,看是否将qt opensource版在
MsVc.net环境下编译过去,目前来看,好象有些问题,比如trolltech给出opensourc里
的qmake可能跟商业版的qmake不尽相同。现在没有时间整这些,试目以待。
在这个邮件列表里可以搜索到一些 关于此话题的技术讨论
http://lists.kde.org/?l=kde-cygwin&r=1&w=2
在http://www.qtforum.org/board.php?boardid=45j和
http://www.osnews.com/comment.php?news_id=9675&limit=no里也有一些讨论,很是
热闹!

phpBB m2f

找到m2f ( mail to forum) for phpBB,可以实现email和论坛帖子的互通。也许可以
用于西部数据中心的数据社区。
最早是亮子告诉我的,由于重做系统,以前的links不幸丢掉,今晚上想起来又重新找
了一下。感觉挺好的一个东西。
网址:http://www.mail2forum.com

Add ODBC support using Astrum InstallWizard

By default, Astrum Installwizard does not support ODBC. You can do it by
adding some variables. Here is an example as following:

1. Advanced/Variables, add a variable named <odbcUserDsnDir>, with a Text
type, Get variable from Registry, Default value "C:Program FilesCommon
FilesODBCData Sources", Root key: HKLM, Path:
HKEY_LOCAL_MACHINESOFTWAREODBCODBC.INIODBC File DSN, and Value name:
DefaultDSNDir. Thereafter, you can use <odbcUserDsnDir> to get file DSN’s
location.

2. Files to install, add the target dsn file, such as notesphr.dsn in my
example, specifying the target directory as <odbcUserDsnDir>. It will make
the dsn file copy from the installation packaget to the dsn default
directory. This is my dsn file’s content:

[ODBC]
DRIVER=Microsoft Access Driver (*.mdb)
UID=admin
UserCommitSync=Yes
Threads=3
SafeTransactions=0
PageTimeout=5
MaxScanRows=8
MaxBufferSize=2048
FIL=MS Access
DriverId=25
DefaultDir=C:Program FilesPhraseMemodatabase
DBQ=C:Program FilesPhraseMemodatabasenotesphr.db

3. In the notesphr.dsn, the last two lines should be changed in reponse of
the installation directory. We can do this with the help of System
changes/Text files. Click Add…, select Replace text action, specify the
filename, which is, in this example, <odbcUserDsnDir>notesphr.dsn, Search
text "DefaultDir=C:Program FilesPhraseMemodatabase" (quote marks
excluded) by replaced with "DefaultDir=<InstallDir>database" (quote marks
excluded), click ok to dismiss the dialog. Same as just now what we did,
replace "DBQ=C:Program FilesPhraseMemodatabasenotesphr.db" with
"DBQ=<InstallDir>databasenotesphr.db"

4. done. The installation will automatically copy your dsn file to the
target computer’s appropriate directory according to the computer’s
settings.

-by tong#cngis.org

低级错误

犯了一个十分低级的错误,居然花了我很长时间才找到原因。
const QString& PmKeywords::Keyword()
{
return keywords.toString();
}
而 这里,keywords被定义成QValueVector,toString返回QString。大家明白问题出在哪 了吗?由于toString返回QString,而不是QString&,是局部变量,而Keyword属性返回QString&,是一 个引用,即是将局部变量的引用返出来了,但局部变量在scope出了后,就被销毁,这样返出来的就是一个无效的引用。由于整个代码已经近5000行,查错 查起来很麻烦,好歹还是找着了,前面还一直怀疑是否QSqlCursor有问题,在进行QSqlCursor Update的时候发生错误,但根本在于上面描述。一个教训,轻易不要怀疑这些大公司写的商业代码,只能从自己的代码上找原因,这样也许会更有助于除错。

ms sharepoint portal server 2003的卸载问题

I had this issue and solved it by doing the following:
SYMPTOMS
When you use the Add/Remove Programs tool to remove SharePoint Portal Server and Windows SharePoint Services from your server, you may receive the following error message in a SPSADM.EXE – Common Language Runtime Debugging Services dialog box:
Application has generated an exception that cannot be handled.

Process id=0xb60 (2912), Thread id=0x1dc (476)

Click OK to terminate the application.
Click CANCEL to debug the application.
Additionally, you may receive the following error message in a Microsoft Office SharePoint Portal Server 2003 Setup dialog box:
Installation ended prematurely because of an error.
CAUSE
This issue occurs if you do not remove SharePoint Portal Server and Windows SharePoint Services in the correct order. This issue occurs if you remove Windows SharePoint Services before you remove SharePoint Portal Server from the server.

To fully remove SharePoint Portal Server from the server, you must remove the programs in the following order:
SharePoint Portal Server
Windows SharePoint Services
Microsoft SQL Server Desktop Engine (MSDE), if it is installed on the server
WORKAROUND
To recover a server where SharePoint Portal Server and Windows SharePoint Services are not removed in the correct order:
Log on to the server as a member of the local Administrators group.
Click Start, and then click Run.
In the Open box, type cmd, and then click OK.
Switch to the drive where SharePoint Portal Server is installed.
Type the following line, where CDimage is the path of the shared folder that contains the SharePoint Portal Server CD files, and then press ENTER:
msiexec /qb /i <CDimage>WSSSts.msi /L*v <full path>STS_Install.log LAUNCHEDFROMSETUPSTS=1

Switch to the drive where Windows is installed.
Type the following line, and then press ENTER:
cd %programfiles%Common FilesMicrosoft SharedWeb Server Extensions60Config

Type the following line, and then press ENTER:
copy Web.config Web.config.bak

Type the following line, where CDimage is the path of the shared folder that contains the SharePoint Portal Server CD files, and then press ENTER:
msiexec /qb /I <CDimage>SPSSps.msi /L*v <full path>SPS_Binary_Upgrade.log REBOOT=ReallySuppress

Type the following line, where CDimage is the path of the shared folder that contains the SharePoint Portal Server files, and then press ENTER:
msiexec /qb /famsv <CDimage>SPSSps.msi /L*v <full path>SPS_Repair.log REBOOT=ReallySuppress DONTSTARTSERVICE=1

When Setup completes and you are prompted to restart the server, click No.
Use the Add/Remove Programs tool to remove SharePoint Portal Server, Windows SharePoint Services, and MSDE (if it is installed on the server).

Important Make sure that you remove the programs in this exact order.
To avoid this issue when you remove SharePoint Portal Server from the server, use the Add/Remove Programs tool to remove the programs in the following order:
SharePoint Portal Server
Windows SharePoint Services
MSDE (if it is installed on the server)
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

sourceoffsite 安装非法字符错误

sourceOffsite在windows server 2003 sp1上安装时,当启动其服务时,提示非法字符
错误,服务不能启动。
解决方法:regedit到HKLMsystemcontrolset001servicesSosSvrSvc.net里的
imagePath里的引号去掉。
该方法已在sos KB里发布。

windows firewall & passive mode ftp

windows (sp2及2003)自带的防火墙允许配置例外,包括程序例外,和端口例外两
种。两者有区别,程序例外是允许程序打开的链接(connection)能够通过防火墙,但
防火墙外不能在程序启动前打开某一端口来连接到此程序。端口例外将开放此指定的端
口,允许防火墙内外的程序通过此端口交互。举个例子,当使用servuDeamon.exe建立
passive mode的端口为ftp,除了在程序例外中,指定servuDeamon.exe外,还要指定
2200端口例外。由于在ftp通讯前,客户端需要先行通过2200端口与服务器建立链接,
如果不指定2200例外,防火墙将阻止2200。当2200的cmd端口打开后,servuDaemon.exe
将打开新端口建立data链接,进入passive(比如servu passive端口是从
40000-40049)状态,这时程序例外必须启动。